Date: Fri, 14 Sep 2001 16:36:36 -0400 From: parv <parv_@yahoo.com> To: Thomas Stratmann <thomas.stratmann@ruhr-uni-bochum.de> Cc: stable@freebsd.org Subject: Re: Removing unused packages? Message-ID: <20010914163636.A1185@moo.holy.cow> In-Reply-To: <3BA24709.A1EBC186@ruhr-uni-bochum.de>; from thomas.stratmann@ruhr-uni-bochum.de on Fri, Sep 14, 2001 at 08:06:01PM %2B0200 References: <3BA24709.A1EBC186@ruhr-uni-bochum.de>
next in thread | previous in thread | raw e-mail | index | archive | help
this was, on the fateful occasion around Sep 14 14:06 -0400, sent by Thomas Stratmann > > 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... ... see pkg_info(1), especially the -[rR] options & portupgrade(1) and -[nrR] options. also, be careful when you go un-installing by solely depending on the the presence, or content of, +REQUIRED_BY, file as that file may be missing or not properly updated... say if you install/deinstall/install in a dependency port directory. sorry for that long "sentence". - parv -- 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?20010914163636.A1185>