* Matt LaPlante <[EMAIL PROTECTED]> [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 ]
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
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to