From owner-freebsd-questions@FreeBSD.ORG Fri Apr 4 10:20:57 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 C888037B401 for ; Fri, 4 Apr 2003 10:20:57 -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 A0CCB43FCB for ; Fri, 4 Apr 2003 10:20:56 -0800 (PST) (envelope-from mwm-dated-1049912455.a8b6ce@mired.org) Received: (qmail 56442 invoked from network); 4 Apr 2003 18:20:55 -0000 Received: from localhost.mired.org (HELO guru.mired.org) (127.0.0.1) by localhost.mired.org with SMTP; 4 Apr 2003 18:20:55 -0000 Received: by guru.mired.org (tmda-inject, from uid 100); Fri, 04 Apr 2003 12:20:55 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16013.52484.125528.851826@guru.mired.org> Date: Fri, 4 Apr 2003 12:20:52 -0600 To: Adam In-Reply-To: <1049438180.27963.60.camel@jake> References: <1049438180.27963.60.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: Fri, 04 Apr 2003 18:20:58 -0000 In <1049438180.27963.60.camel@jake>, Adam typed: > So, what I'd like to do is list all the ports installed on my box that > have nothing dependant on them. In this way, I could start removing > things that I don't need anymore. > > Is there any clever way to do this? I've toyed around with a few ideas, > but haven't been able to come up with anything that works nicely. 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. So the recommended methodology is: Put a sorted list of ports you know you want to keep in "keeps". Generate a list of things to try and delete by (cd /var/db/pkg; ls | sort) | comm -23 - keeps | xargs pkg_delete and keep doing that as long as things are vanishing from /var/db/pkg. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.