From owner-freebsd-questions@FreeBSD.ORG Tue Jun 26 10:44:28 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 EC7A316A421 for ; Tue, 26 Jun 2007 10:44:28 +0000 (UTC) (envelope-from freebsd@meijome.net) Received: from sigma.octantis.com.au (ns2.octantis.com.au [207.44.189.124]) by mx1.freebsd.org (Postfix) with ESMTP id A0CBE13C448 for ; Tue, 26 Jun 2007 10:44:28 +0000 (UTC) (envelope-from freebsd@meijome.net) Received: (qmail 691 invoked from network); 26 Jun 2007 05:44:27 -0500 Received: from unknown (HELO localhost) (210.84.50.231) by sigma.octantis.com.au with (DHE-RSA-AES256-SHA encrypted) SMTP; 26 Jun 2007 05:44:26 -0500 Date: Tue, 26 Jun 2007 20:44:22 +1000 From: Norberto Meijome To: Zhang Weiwu Message-ID: <20070626204422.69bdbcba@localhost> In-Reply-To: <1182844376.9138.31.camel@joe.realss.com> References: <1182844376.9138.31.camel@joe.realss.com> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.13; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions ML Subject: Re: commandline to remove a package and its dependencies 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: Tue, 26 Jun 2007 10:44:29 -0000 [ added freebsd-questions to CC: ] On Tue, 26 Jun 2007 15:52:56 +0800 Zhang Weiwu wrote: > From: Zhang Weiwu > To: Norberto Meijome > Subject: commandline to remove a package and its dependencies > Date: Tue, 26 Jun 2007 15:52:56 +0800 > X-Mailer: Evolution 2.8.2 > Organization: Real Softservice > > Dear list > > Stupid question again. Is there a commandline tool that I can use to > remove a package 'wmaker', and then it will prompt me if I wish to > remove packages that was required only by 'wmaker' and after wmaker is > removed, become required by no other packages. Such packages existed > only for 'wmaker' is very likely should be removed together with wmaker. Hi Zhang, you basically want to remove "leaves" from the package tree - install pkg_cutleaves from ports : pkg_cutleaves-20061113 Interactive script for deinstalling 'leaf' packages I suggest you run it interactively, as well as creating a file with exclusions (there are some leaves that you want to keep of course). I run it as : [betom@ayiin] [Tue Jun 26 20:43:55 2007] /usr/home/betom $ cat bin/show_pkg_leaves.sh #!/bin/sh pkg_cutleaves -xcl HIH, Beto _________________________ {Beto|Norberto|Numard} Meijome "Gravity cannot be blamed for people falling in love." Albert Einstein I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned.