From owner-freebsd-questions@FreeBSD.ORG Sat Apr 5 15:00:04 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62C7637B401 for ; Sat, 5 Apr 2003 15:00:04 -0800 (PST) Received: from mired.org (ip68-97-54-220.ok.ok.cox.net [68.97.54.220]) by mx1.FreeBSD.org (Postfix) with SMTP id 553B643FBF for ; Sat, 5 Apr 2003 15:00:01 -0800 (PST) (envelope-from mwm-dated-1050015600.8a4947@mired.org) Received: (qmail 74505 invoked from network); 5 Apr 2003 23:00:00 -0000 Received: from localhost.mired.org (HELO guru.mired.org) (127.0.0.1) by localhost.mired.org with SMTP; 5 Apr 2003 23:00:00 -0000 Received: by guru.mired.org (tmda-inject, from uid 100); Sat, 05 Apr 2003 17:00:00 -0600 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="pq19ZxDHUu" Content-Transfer-Encoding: 7bit Message-ID: <16015.24559.667912.675361@guru.mired.org> Date: Sat, 5 Apr 2003 16:59:59 -0600 To: Adam In-Reply-To: <1049582306.91991.30.camel@jake> References: <1049438180.27963.60.camel@jake> <16013.52484.125528.851826@guru.mired.org> <1049582306.91991.30.camel@jake> X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: Mike Meyer X-Delivery-Agent: TMDA/0.73 (Jet Pilot) cc: freebsd-questions@freebsd.org Subject: Re: How to list installed ports that have no dependant ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 23:00:04 -0000 --pq19ZxDHUu Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit In <1049582306.91991.30.camel@jake>, Adam typed: > On Fri, 2003-04-04 at 13:20, Mike Meyer wrote: > > Since you want to delete them, why don't you just use pkg_delete on > > them. If they something depends on them, they won't be deleted. > > I do use pkg_delete, but the idea here is to effectively FIND the ports > that have no ports dependent on them .. I've got 500+ installed ports to > go through here .. Trying pkg_delete on all of them would take too long > .. I need to narrow my search space considerably in order to do this > effectively .. Here's a simple python script for you. You'll need python 2.2 if you haven't got it already. Feed it the output of "pkg_info -a -R" on standard in, and it'll output the package names of all packages that aren't required by other packages. Don't forget that you may have packages which are only required by packages that you don't want, so you need to iterate over the deletion process multiple times. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. --pq19ZxDHUu--