From owner-freebsd-stable@FreeBSD.ORG Tue Jan 27 14:02:09 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2A2666F for ; Tue, 27 Jan 2015 14:02:09 +0000 (UTC) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.126.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gromit.dlib.vt.edu", Issuer "Chumby Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 95371F31 for ; Tue, 27 Jan 2015 14:02:09 +0000 (UTC) Received: from pmather.lib.vt.edu (pmather.lib.vt.edu [128.173.126.193]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gromit.dlib.vt.edu (Postfix) with ESMTPSA id 05CE3339; Tue, 27 Jan 2015 09:02:01 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Recursively Deinstalling and Upgrading Packages/Ports without Breaking Dependencies? From: Paul Mather In-Reply-To: Date: Tue, 27 Jan 2015 09:02:01 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <506815E7-ED7A-4381-9ABA-D8FF84406A4D@gromit.dlib.vt.edu> References: <54C6CDB5.2040501@gmail.com> <54C73B84.1080704@infracaninophile.co.uk> To: Chris Knight X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2015 14:02:09 -0000 On Jan 27, 2015, at 3:13 AM, Chris Knight wrote: > Howdy, >=20 > On 27 January 2015 at 18:17, Matthew Seaman > wrote: >> On 2015/01/26 23:28, Pierre-Luc Drouin wrote: >>> With portupgrade, I used to use "pkg_deinstall -R" to deinstall a >>> package and its dependencies while preserving the packages on which >>> other packages were depending on. With pkgng, the behaviour of >>> "pkg_deinstall -R" changed and this command is now breaking >>> dependencies. Is there a new method to safely remove packages = recursively? >>=20 >> # pkg delete pkgname >> # pkg autoremove >>=20 > That only works if the dependencies were added as automatic > dependencies. Won't work if the dependency wasn't automatically added > as part of the package's prerequisites for installation. The ports-mgmt/pkg_cutleaves port will let you trim your installed=20 packages, working inwards from outer leaf packages. It's also possible=20= to designate a list of packages to pkg_cutleaves that you always want=20 to retain, so as to speed up trimming by not presenting these (and=20 anything they depend upon) as candidates for removal. Cheers, Paul.