Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jul 2007 22:19:00 -0500
From:      ajm <ajm91qw@sbcglobal.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Ports Clean
Message-ID:  <20070714031900.GA1023@powerfull.bsd>
In-Reply-To: <200707131305.12565.josh@tcbug.org>
References:  <004601c7c56f$9d08f480$6501a8c0@GRANT> <200707131305.12565.josh@tcbug.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 13, 2007 at 01:05:09PM -0500, Josh Paetzel wrote:
> On Friday 13 July 2007, Grant Peel wrote:
> > Hi all,
> >
> > My ports collection on some of the servers is wasting alot of
> > space.
> >
> > What would be the best method to 'cleanout' the ports dir without
> > adversly affecting the operation of the rest of the server?
> >
> > All of the servers are live production servers.
> >
> > -Grant
> 
> There are a few possibilities.
> 
> 1) cd to each installed ports dir and do a make clean
> 2) do the same but a make distclean
> 3) rm -rf /usr/ports/*/*/work
> 4) rm -rf /usr/ports and recvsup the tree
> 
> -- 
> Thanks,
> 
> Josh Paetzel

or you can put the following in a script

# cleaning all work directories of install ports.

plist=`pkg_version -voI |awk '{ print $1 }'`
for porg in $plist ; do
    cd /usr/ports/${porg} && make clean
done

-- 
Alexander
FreeBSD 6.0-RELEASE i386



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070714031900.GA1023>