From owner-freebsd-stable@FreeBSD.ORG Tue May 17 21:33:33 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19C0616A4CE for ; Tue, 17 May 2005 21:33:33 +0000 (GMT) Received: from mail24.syd.optusnet.com.au (mail24.syd.optusnet.com.au [211.29.133.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64AB843DD3 for ; Tue, 17 May 2005 21:33:32 +0000 (GMT) (envelope-from gmenhennitt@optusnet.com.au) Received: from [203.2.73.8] (c220-237-129-201.mckinn1.vic.optusnet.com.au [220.237.129.201])j4HLXQEE011560; Wed, 18 May 2005 07:33:27 +1000 Message-ID: <428A62DD.1060300@optusnet.com.au> Date: Wed, 18 May 2005 07:32:13 +1000 From: Graham Menhennitt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: Peter Jeremy References: <20050517115356.GA15638@kierun.org> <4289E139.3070200@optusnet.com.au> <20050517194532.GB1511@cirb503493.alcatel.com.au> In-Reply-To: <20050517194532.GB1511@cirb503493.alcatel.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-stable@freebsd.org Subject: Re: pkg question... X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2005 21:33:33 -0000 Peter Jeremy wrote: >On Tue, 2005-May-17 22:19:05 +1000, Graham Menhennitt wrote: > > >>Yann Golanski wrote: >> >> >> >>>Is there a way to remove a package and the dependencies that only said >>>package uses? >>> >>> >>> >>> >>ports -> sysutils/pkg_rmleaves >> >> > >That is an interactive script that lets you delete all packages that >aren't required by other packages. You still need some way to work >out what dependencies were installed by the first package. > > But I think it can be made to do what Yann wants. You can pkg_delete the original package/port (A as he described it). Then run pkg_rmleaves (possibly more than once) and it will delete B and D, but keep C because it's not a leaf. If you have any leaf packages that you don't want to delete, you need to be careful of those. Perhaps run pkg_rmleaves before deleting A and note any pre-existing leaves. Graham