From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout2.vodafonemail.de (smtpout2.vodafonemail.de [145.253.239.133]) by sourceware.org (Postfix) with ESMTPS id 70748385041E for ; Tue, 30 Mar 2021 17:47:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 70748385041E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nexgo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Stromeko@nexgo.de Received: from smtp.vodafone.de (smtpa08.fra-mediabeam.com [10.2.0.39]) by smtpout2.vodafonemail.de (Postfix) with ESMTP id CB01A122601 for ; Tue, 30 Mar 2021 19:47:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexgo.de; s=vfde-smtpout-mb-15sep; t=1617126446; bh=/udSOnTH6n5z8xA2mIr0fVzl22tp20UkUQXWVqDyVKY=; h=From:To:Subject:References:Date:In-Reply-To; b=Ae4CsuNeUYTxAWXW6ouQ2m4lK9BiujhzfX2H93E8HlfZBTVgDyTNubc8TZLPBAyqN h5hjgN6w35xLuMrhsZDvUbcUxcC23d0NTiPfQOwxXekzcN6niMdOYhe9ybdBpnveIR 5W96E3AlhANRKffB06BwSCa+R3R3lput1Rrryryw= Received: from Gertrud (p57b9d8ab.dip0.t-ipconnect.de [87.185.216.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 5BA361401BF for ; Tue, 30 Mar 2021 17:47:26 +0000 (UTC) From: Achim Gratz To: cygwin@cygwin.com Subject: Re: How to uninstall packages that were installed as dependency but are no longer required References: <20210330.145159.2203755649720422295.yasu@utahime.org> <4c3c2dc4-6de3-9a3b-b39a-986e651275c3@gmail.com> Date: Tue, 30 Mar 2021 19:47:18 +0200 In-Reply-To: <4c3c2dc4-6de3-9a3b-b39a-986e651275c3@gmail.com> (Marco Atzeri via Cygwin's message of "Tue, 30 Mar 2021 10:07:04 +0200") Message-ID: <87wnto4jq1.fsf@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 1912 X-purgate-ID: 155817::1617126446-00005C41-E70AC94A/0/0 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.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: , X-List-Received-Date: Tue, 30 Mar 2021 17:47:30 -0000 Marco Atzeri via Cygwin writes: > as currently we are not tracking between choosen packages > and installed by dependency, Cygwin is lacking such capabilities We do, since this commit in 2016: https://sourceware.org/git/?p=cygwin-setup.git;a=commitdiff;h=f6d6c600edffdb83a57ed13384e38a504fdc366b However, it does only work if you pick by package and not by group and it has not yet been sufficiently tested to invoke auto-removal of such packages IMHO. If you're adventurous you could recognitize these packages as being installed as dependencies (maybe they already are, I have not checked) and then in libsolv use the SOLVER_CLEANDEPS flag for the solution so they can get removed if they are no longer part of a dependency chain that leads to an explicitly installed package. Setup has two command line options that somewhat deal with this problem, both of them were implemented before setup gained the capability mentioned above and none of them do directly what the OP was asking: The option --delete-orphans / -o removes packages installed on the system that are no longer available from the repository. The option --prune-install / -Y will remove _all_ packages except the ones that are explicitly requested via either --packages / -P or --categories / -C. I implemented this to enable up- and downgrading installations in unattended mode when that includes removal of packages, but that requires you to know the list of packages that you need to keep including their dependencies. I generate a new setup.ini with extra categories for this purpose (each of the categories contains all packages including dependencies for each type of install supported). Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds