X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A01B3858002 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca X-Authority-Analysis: v=2.4 cv=MaypB7zf c=1 sm=1 tr=0 ts=60635d6a a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17 a=eEWpYuX9kD4Xz4_Z:21 a=IkcTkHD0fZMA:10 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10 From: Brian Inglis Subject: Re: How to uninstall packages that were installed as dependency but are no longer required To: cygwin AT cygwin DOT com References: <20210330 DOT 145159 DOT 2203755649720422295 DOT yasu AT utahime DOT org> <4c3c2dc4-6de3-9a3b-b39a-986e651275c3 AT gmail DOT com> Organization: Systematic Software Message-ID: Date: Tue, 30 Mar 2021 11:18:32 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <4c3c2dc4-6de3-9a3b-b39a-986e651275c3@gmail.com> Content-Language: en-CA X-CMAE-Envelope: MS4xfPkSeyfpAoU3fdbdLgx+h/H6Vzia9W1svTdktbKkcvd56jldRzk58g8phi36DnedGYodcl7yPounOrDzRDD5F3vtv8BSrX1AVonrhEdz4Qx16+W1XMLT ERDZVUHw3fv6tJhBkc9fFYZPjjSBX4ATR5GF59eCQhCIDJdUmuJReuKv/WQWJZh+rpDaUgRLyZi0pfK/cPPoEPmfjJq+ZdQ2j+Y= X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 12UHIf6u000685 On 2021-03-30 02:07, Marco Atzeri via Cygwin wrote: > On 30.03.2021 07:51, Yasuhiro Kimura wrote: >> If you repeat the update of installed Cygwin packages for a while, >> it's quite possible that there are some packages that were installed >> as dependency but are no longer required by any others. >> >> Then is there any way to detect and uninstall such ones? >> >> I expect such way as `apt autoremove` of Debian or `dnf autoremove` of >> Fedora. > as currently we are not tracking between choosen packages > and installed by dependency, Cygwin is lacking such capabilities The undocumented third field in installed.db is automatic dependency 0 / manually picked 1: $ sort -k3 /etc/setup/installed.db | uniq -cf2 1 INSTALLED.DB 3 1203 _autorebase _autorebase-001007-1.tar.bz2 0 467 aalib aalib-1.4rc5-12.tar.bz2 1 > the most likely candidates for removal are the different version > of the same libraries > > $ cygcheck -cd | grep "^lib" | tee lib.txt > > in my case I see > > libvpx1                                 1.3.0-2 > libvpx3                                 1.5.0-1 > libvpx4                                 1.6.1-1 > libvpx5                                 1.7.0-1 > > $ cygcheck-dep -q -n libvpx1 libvpx3 libvpx4 libvpx5 > libvpx1: is needed for ( ) > libvpx3: is needed for ( ) > libvpx4: is needed for ( ) > libvpx5: is needed for ( gstreamer1.0-plugins-good libvpx-devel ) Using the above info you could run a check for automatic dependencies no longer needed, but you *MUST* retain and not attempt to deinstall Base packages, plus packages automatically installed to replace obsolete packages, which ideally would inherit the manually picked flag of the obsolete package. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.] -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple