From owner-freebsd-questions@FreeBSD.ORG Tue Feb 1 11:50:03 2005 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 41F9816A4D0 for ; Tue, 1 Feb 2005 11:50:03 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id E31F543D1D for ; Tue, 1 Feb 2005 11:50:01 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j11BnwYs019480 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Feb 2005 03:49:58 -0800 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.10/Submit) id j11BnvRt019478; Tue, 1 Feb 2005 03:49:57 -0800 X-Authentication-Warning: hosea.tallye.com: sttng359 set sender to lorenl@alzatex.com using -f Date: Tue, 1 Feb 2005 03:49:57 -0800 From: "Loren M. Lang" To: "Michael C. Shultz" Message-ID: <20050201114957.GJ8619@alzatex.com> References: <200502010216.j112Gwll028376@smtp4.server.rpi.edu> <200501311822.59155.reso3w83@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200501311822.59155.reso3w83@verizon.net> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: freebsd-questions@freebsd.org cc: Matt LaPlante Subject: Re: Cleaning Out 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: Tue, 01 Feb 2005 11:50:03 -0000 On Mon, Jan 31, 2005 at 06:22:58PM -0800, Michael C. Shultz wrote: > On Monday 31 January 2005 06:16 pm, Matt LaPlante wrote: > > Well what I'm more concerned with is how would you locate orphaned > > dependencies after the fact. For a parallel example, in gentoo you > > would "emerge --depclean" which searches the tree for any orphaned > > packages and removes them. So say I hadn't used the -r flag when > > removing packages on BSD, how could I find the leftovers later? > > > Look at /usr/ports/sysutils/pkg_cutleaves > > here is a excerpt from its man page: > > "pkg_cutleaves finds installed 'leaf' packages, i.e. packages that are > not referenced by any other installed package, and lets you decide for > each one if you want to keep or deinstall it (via pkg_deinstall(1)). > Once the packages marked for removal have been flushed/deinstalled, > you'll be asked if you want to do another run (to see packages that > have become 'leaves' now because you've deinstalled the package(s) that > depended on them). In every run you will be shown only packages that > you haven't marked for keeping, yet." There's still one missing part to it that gentoo's portage has. In addition to the standard database of installed packages, emerge keeps track of every single package that you explicitly installed in a file called world. Upgrades read this file and update all the packages listed, including there dependencies first. Now if a package that was installed to satisfy a dependency, but not explicitly installed is now longer needed, it will stay on the system until the next time emerge --depclean is run. --depclean tells emerge to remove any packages that are not in the world file and are not needed to satify dependencies for packages in the world file, either directly or indirectly. I think this is the behavior that the original poster was asking for. AFAIK, this is not yet possible in FreeBSD, but it should be a trivial matter to add something like a world file to portupgrade. Maybe, if I have time this week I could work on a patch... > > > -- > > Matt LaPlante > > System Administrator > > Center for Automation Technologies > > RPI/CAT, CII 8015 > > 110 8th Street > > Troy, NY 12180 > > Phone: (518) 276-2275 > > laplante@cat.rpi.edu > > www.cat.rpi.edu > > > > > -----Original Message----- > > > From: Pat Maddox [mailto:pergesu@gmail.com] > > > Sent: Monday, January 31, 2005 8:55 PM > > > To: Matt LaPlante > > > Cc: freebsd-questions@freebsd.org > > > Subject: Re: Cleaning Out Ports? > > > > > > If you try to remove a package that has child dependencies, then > > > it'll let you know. You'll have to use the -f flag to force it to > > > delete the package, despite there being any dependencies. If you > > > want to delete a package along with all its dependencies, you can > > > use the -r flag. > > > > > > Use pkgdb -F to fix any dependencies that might be broken. > > > > > > I think that's about right. I'm a FreeBSD newbie :) > > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > > "freebsd-questions-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C