From owner-freebsd-questions@FreeBSD.ORG Sat Jul 14 03:46:07 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 179E516A400 for ; Sat, 14 Jul 2007 03:46:07 +0000 (UTC) (envelope-from ajm91qw@sbcglobal.net) Received: from smtp113.sbc.mail.mud.yahoo.com (smtp113.sbc.mail.mud.yahoo.com [68.142.198.212]) by mx1.freebsd.org (Postfix) with SMTP id B826C13C4A3 for ; Sat, 14 Jul 2007 03:46:06 +0000 (UTC) (envelope-from ajm91qw@sbcglobal.net) Received: (qmail 29700 invoked from network); 14 Jul 2007 03:19:26 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:Date:From:To:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=gsTQiKgGfaL9mVB0AA3agggp243vkswLz6wMhG00cJMy3EQCf0uVn2qI0CLa1gV/x5RcCZj7pHxzBuwPTe5+fMgCso9qduL37zIVN1U0mKNWG44hqT1dpy5jtMyZzlSVjXbgxx8giSxUU/qV5KnG1vRz+W4Kb+BwPEjyRTj00Os= ; Received: from unknown (HELO localhost) (ajm91qw@sbcglobal.net@71.149.163.5 with plain) by smtp113.sbc.mail.mud.yahoo.com with SMTP; 14 Jul 2007 03:19:25 -0000 X-YMail-OSG: Ax2BMR8VM1nyPNOpbyL2Wqc4dsmN5BZBbFzKPTwj31m6vFh5f3VFy.X6ZcZubPEOTCLzY7dpBA-- Date: Fri, 13 Jul 2007 22:19:00 -0500 From: ajm To: freebsd-questions@freebsd.org Message-ID: <20070714031900.GA1023@powerfull.bsd> References: <004601c7c56f$9d08f480$6501a8c0@GRANT> <200707131305.12565.josh@tcbug.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200707131305.12565.josh@tcbug.org> User-Agent: Mutt/1.5.15 (2007-04-06) Subject: Re: Ports Clean X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2007 03:46:07 -0000 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