From owner-freebsd-stable@FreeBSD.ORG Wed Jan 17 20:01:20 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 47C0016A407 for ; Wed, 17 Jan 2007 20:01:20 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id 2B9DC13C44C for ; Wed, 17 Jan 2007 20:01:20 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id l0HK1IcG038624; Wed, 17 Jan 2007 12:01:18 -0800 (PST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-stable@freebsd.org Date: Wed, 17 Jan 2007 14:58:23 -0500 User-Agent: KMail/1.9.5 References: <45AE68DE.7060304@tomjudge.com> <200701171429.32081.lists@jnielsen.net> In-Reply-To: <200701171429.32081.lists@jnielsen.net> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701171458.23526.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Tom Judge Subject: Re: Removing unused core components. (Disabled in make.conf) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 20:01:20 -0000 On Wednesday 17 January 2007 14:29, John Nielsen wrote: > On Wednesday 17 January 2007 13:52, Victor Snezhko wrote: > > Tom Judge writes: > > > Hi, > > > > > > I have the following options in /etc/make.conf: > > > > > > NO_PROFILE=true > > > NO_SENDMAIL=true > > > NO_GAMES=true > > > NO_I4B=true > > > NO_ATM=true > > > NO_INET6=true > > > NO_BLUETOOTH=true > > > NO_IPFILTER=true > > > NO_RCMDS=true > > > NO_KERBEROS=true > > > > > > > > > However after a "make buildworld installworld" the utilities and libs > > > associated with these packages are still installed, is there any easy > > > way to remove them from the system? > > > > make delete-old > > That will delete obsolete files no longer used by the current version of > the operating system, but it won't do what the OP is asking. > > I don't know of a one-step way to do what you're asking. You could do a > find over the base system directories and look for files older than your > last installworld. That might not fit the "easy" part of the request since > you'd have to go over the list manually to make sure it wasn't killing > anything you actually need, but it should be mostly accurate. Here's a script I just put together to get a good first approximation of outdated files using the approach above. Change the variables to be appropriate for your situation, review the output file carefully before deleting anything, and use at your own risk. :) === start prune.sh === #!/bin/sh DIRS="/bin /lib /libexec /rescue /sbin /usr/bin /usr/games /usr/lib \ /usr/libdata /usr/libexec /usr/sbin" OUTFILE=/usr/local/scripts/prune-files.txt AGE="1 month" rm -f ${OUTFILE} for d in ${DIRS} ; do find ${d} -type f ! -newermt "${AGE} ago" >> ${OUTFILE}.tmp done grep -vF "lib/compat" ${OUTFILE}.tmp | grep -vi perl > ${OUTFILE} rm -f ${OUTFILE}.tmp === end prune.sh === JN