From owner-freebsd-stable Fri Sep 14 11: 3:22 2001 Delivered-To: freebsd-stable@freebsd.org Received: from sunu422.rz.ruhr-uni-bochum.de (sunu422.rz.ruhr-uni-bochum.de [134.147.64.14]) by hub.freebsd.org (Postfix) with SMTP id 7C18D37B414 for ; Fri, 14 Sep 2001 11:03:11 -0700 (PDT) Received: (qmail 19849 invoked by uid 82); 14 Sep 2001 18:03:09 -0000 Received: from thomas.stratmann@ruhr-uni-bochum.de by mailhost with qmail-scanner-1.00 (uvscan: v4.1.40/v4158. . Clean. Processed in 0.251635 secs); 14 Sep 2001 18:03:09 -0000 Received: from unknown (HELO ruhr-uni-bochum.de) (134.147.159.3) by mailhost.rz.ruhr-uni-bochum.de with SMTP; 14 Sep 2001 18:03:09 -0000 Message-ID: <3BA24709.A1EBC186@ruhr-uni-bochum.de> Date: Fri, 14 Sep 2001 20:06:01 +0200 From: Thomas Stratmann X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: stable@freebsd.org Subject: Removing unused packages? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 () { 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. Cheers Thomas Stratmann To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message