Date: Fri, 14 Sep 2001 19:32:57 +0100 From: ian j hart <ianjhart@ntlworld.com> To: Thomas Stratmann <thomas.stratmann@ruhr-uni-bochum.de> Cc: stable@FreeBSD.ORG Subject: Re: Removing unused packages? Message-ID: <3BA24D59.DC432A8A@ntlworld.com> References: <3BA24709.A1EBC186@ruhr-uni-bochum.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Thomas Stratmann wrote: > > Hi all, > > I dumped into the need to remove all packages that are not required by > any other, excluding some I am willing to keep (on a > decide-foreach-basis). Is there any tool or option to the pkg_* tools to > help me with this? > > I made this perl script > > open(PKGS, "ls /var/db/pkg |"); > while (<PKGS>) { > chomp; > $files = `ls /var/db/pkg/$_`; > > if (!($files =~ /REQUIRED_BY/g)) { > print; > print "\n"; > } > } > > which, I hope, dumps me the bottom-leaf packages installed... > If there is no such tool or option as mentioned above, please let me > know if there are any problems with the script (I do not go for any > price in beauty, as you can see...). If it works well, it might then be > of use to some of you. pkg_delete -i "*" This should refuse to delete packages with dependencies even if you respond yes. Of course I didn't test this :) I've taken to packaging everything I build from ports. This way you can just do... pkg_delete -a ...then pkg_add from the built copies. You'll see the advantage if you ever build KDE from ports (18hrs for me!). > > Cheers > Thomas Stratmann > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message HTH -- ian j hart To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BA24D59.DC432A8A>