Date: Tue, 1 Feb 2005 08:24:37 +0100 From: "David J. Weller-Fahy" <dave-lists-freebsd-questions@weller-fahy.com> To: freebsd-questions@freebsd.org Subject: Re: Cleaning Out Ports? Message-ID: <20050201072415.GB87827@weller-fahy.com> In-Reply-To: <200502010132.j111WhkT007090@smtp3.server.rpi.edu> References: <200502010132.j111WhkT007090@smtp3.server.rpi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--98e8jtXdkpgskNou Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Matt LaPlante <laplante@cat.rpi.edu> [2005-02-01 02:36 +0100]: > I know the ports system is designed to install dependencies > automatically, but how does one go about removing them? Say one large > package installs several dependencies, but then later on that package > is removed...and now we're left with several orphaned packages. Is > there a way to either detect, or even automatically clean out orphaned > packages? I'm particularly concerned because I'm dealing with a few > systems which are rather well aged, and have gone through several > upgrade cycles. I know the Linux version of the ports system found in > Gentoo (portage) offers extensive functionality for finding and > removing orphaned dependencies, so I'm hoping FreeBSD has some such > feature as well. Thanks. You might want to try the attached script, it's what I've been using for a while. Run with any arguments to print output to terminal. Run with no arguments to create a file called 'remove_leaf_ports.sh'. After reviewing the generated script, run it thusly: sudo sh < remove_leaf_ports.sh You can list the prefixes of the ports that you don't want removed in /usr/local/etc/rm_leaf.conf. One prefix per line, no leading/trailing whitespace. The script will not remove any port that is required by any other port. I usually have to run it two or three times after a batch of upgrades/installs. I just got tired of installing ports to manage ports. ;] Attached is my script, and my conf file. Regards, -- dave [ please don't CC me ] --98e8jtXdkpgskNou Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rm_leaf.conf" ctorrent daemontools getmail gnupg ifgraph isoqlog mathopd mess822 mutt-devel mysql-server p5-Mail-SpamAssassin php4-mysql php4-pcre portaudit portmanager qlogtools qmailanalog safecat samba screen sudo ucspi-ssl ucspi-tcp unrar unzip vim vmailmgr w3m --98e8jtXdkpgskNou--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050201072415.GB87827>