From owner-freebsd-questions@FreeBSD.ORG Sun Mar 25 01:41:48 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 9311516A400 for ; Sun, 25 Mar 2007 01:41:48 +0000 (UTC) (envelope-from bsd-unix@earthlink.net) Received: from pop-scotia.atl.sa.earthlink.net (pop-scotia.atl.sa.earthlink.net [207.69.195.65]) by mx1.freebsd.org (Postfix) with ESMTP id 6F73513C455 for ; Sun, 25 Mar 2007 01:41:48 +0000 (UTC) (envelope-from bsd-unix@earthlink.net) Received: from fl-76-3-168-71.dhcp.embarqhsd.net ([76.3.168.71] helo=kt.weeeble.com) by pop-scotia.atl.sa.earthlink.net with smtp (Exim 3.36 #1) id 1HVHjZ-0003ds-00; Sat, 24 Mar 2007 21:41:26 -0400 Date: Sat, 24 Mar 2007 21:41:31 -0400 From: Randy Pratt To: Gary Kline Message-Id: <20070324214131.e953233b.bsd-unix@earthlink.net> In-Reply-To: <20070325003758.GA812@thought.org> References: <20070325003758.GA812@thought.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: auto-removal of earlier package?? 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: Sun, 25 Mar 2007 01:41:48 -0000 On Sat, 24 Mar 2007 16:37:58 -0800 Gary Kline wrote: > > Guys, > > Can anybody suggest ascript means to rm -i a whole slew of > packages I am collection in /usr/ports/packages/All/? > > On some of my i686's I have collected as many as three versions > of some *tbz files. Other than doing this by-hand on four > boxens, I'd have automate. pkgdb -F will ask if the user wants > to delete (the earlier) of two packages with an [n]. I'd rather > not reinvent the wheel. > > (I *thought* I was nearly finished updating this machine; > suddenty I've got 50 new ones!! ) You might try "portsclean -P". I've not used it but it looks like it might be what you're looking for. You can also test it by adding the "-n" (no execute) to see if it will do what you want, ie "portsclean -nP" for a dry run. Randy --