From owner-freebsd-hackers Wed Feb 12 18: 1:16 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30B2237B414 for ; Wed, 12 Feb 2003 18:01:13 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id C3E7643F85 for ; Wed, 12 Feb 2003 18:01:11 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a152.otenet.gr [212.205.215.152]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h1D2104A026872; Thu, 13 Feb 2003 04:01:01 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.7/8.12.7) with ESMTP id h1D21010002612; Thu, 13 Feb 2003 04:01:00 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.7/8.12.7/Submit) id h1D1xu9D002566; Thu, 13 Feb 2003 03:59:56 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 13 Feb 2003 03:59:56 +0200 From: Giorgos Keramidas To: The Anarcat Cc: hackers@FreeBSD.org Subject: Re: what userland files are necessary for an installworld? Message-ID: <20030213015956.GD2066@gothmog.gr> References: <20030212202327.GH522@xtanbul> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030212202327.GH522@xtanbul> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-02-12 15:23, The Anarcat wrote: > Basically, I suspect I have some dead pre-5.x libs rotting in my > tree. I would like to cleanup /usr/lib and /usr/bin to get rid of > old binaries. Is the /usr/obj directory self-contained? Does it need > a lot of stuff outside of it? You can make sure that your /usr/lib directory is clean, by running the following pre-installworld: # cd /usr # mv lib lib.old # ldconfig -elf /usr/lib.old # mkdir lib Then installworld as usual, and if nothing breaks you can delete /usr/lib.old later. -- The /usr/bin problem is a bit more tricky, since you'll have to check for old files and make sure they can safely go away. A couple of days ago, I used the following at home: $ uname -v FreeBSD 5.0-CURRENT #13: Tue Feb 11 04:45:48 EET 2003 [...] $ /bin/ls -l /usr/bin/* | awk '{printf "%3s %2s\n",$6,$7}' | sort | uniq -c 399 Feb 11 $ If the small script above prints more than one date, then the files of the older date are probably stale, i.e. if the output is: $ /bin/ls -l /usr/bin/* | awk '{printf "%3s %2s\n",$6,$7}' | sort | uniq -c 399 Feb 11 7 Oct 9 You can check which files are the old ones: $ ls -l /usr/bin | grep 'Oct 9' -r-xr-xr-x 1 root wheel - 100229 Oct 9 15:45 a2p -r-xr-xr-x 1 root wheel - 36353 Oct 9 15:45 c2ph -r-xr-xr-x 1 root wheel - 64624 Oct 9 15:46 chflags -r-xr-xr-x 1 root wheel - 24804 Oct 9 15:46 gprof4 -r-xr-xr-x 1 root wheel - 100 Oct 9 15:45 joy -r-xr-xr-x 1 root wheel - 4528 Oct 9 15:46 key -r-xr-xr-x 1 root wheel - 8636 Oct 9 15:46 kzip In this case, the old files are stale Perl programs from my 4.X -> 5.X upgrade, after I completely and utterly hosed my -current installation at home :-) They were removed shortly after my Feb 11 installworld. - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message