From owner-freebsd-ports@FreeBSD.ORG Sat Nov 4 18:59:33 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A683116A47B for ; Sat, 4 Nov 2006 18:59:33 +0000 (UTC) (envelope-from craig@yekse.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 848D043D69 for ; Sat, 4 Nov 2006 18:59:25 +0000 (GMT) (envelope-from craig@yekse.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id 238A8111F3; Sat, 4 Nov 2006 12:59:25 -0600 (CST) Date: Sat, 4 Nov 2006 12:59:21 -0600 From: Craig Boston To: "J. R. Lenz" Message-ID: <20061104185921.GA1014@nowhere> Mail-Followup-To: Craig Boston , "J. R. Lenz" , freebsd-ports@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: freebsd-ports@freebsd.org Subject: Re: useful shell script X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2006 18:59:33 -0000 On Sat, Nov 04, 2006 at 12:40:56PM -0600, J. R. Lenz wrote: > Reclaiming disk space was a high priority on my laptop, which has a 4gb > FreeBSD partition. So, I wrote a useful shell script for removing all the > "work" directories in the ports tree (I'm sure someone has already done > this, but it saves a little bit of time for those people who are not > fluent in shell scripting). You'd be surprised how much disk space can be > freed up by removing unused source code and compiled objects. You may already know about this, but IMHO it's so useful that it bears repeating: $ grep WRKDIRPREFIX /etc/make.conf WRKDIRPREFIX=/usr/obj Then if you forget to run make clean after installing some ports, just: # rm -rf /usr/obj/usr/ports Setting WRKDIRPREFIX in make.conf will cause the ports tree to put all of its 'work' directories under a separate hierarchy. Craig