Un-GNOME-ing a FreeBSD box

Paul Mather paul at gromit.dlib.vt.edu
Sun Dec 12 09:56:32 PST 2004


On Sat, 11 Dec 2004 18:54:18 -0700, Brett Glass <brett at lariat.org>
wrote:

> Again, I really find it hard to believe that there would be no
> provision 
> for deleting a port AND the ports on which it depends cleanly. I tend
> to use a minimal number of ports and packages, and so didn't realize
> that this was such a difficult thing until now.

The problem with deleting a port and the ports on which it depends
cleanly is that there may be other ports depending on a dependency.  So,
there needs to be some arbitration to decide what legitimately should go
and which should stay.  You can't delete a dependency until you also
delete all the ports depending upon it.  If some of them are ports you
want to keep, then the dependency has to stay.

I find the sysutils/pkg_cutleaves port very useful for trimming back on
the ports you've installed but may no longer need.  This is especially
true for some ports that might install various ports needed to build a
given port, but which are not needed for it to run.  The pkg_cutleaves
port can be used to deinstall safely these build dependencies.

Pkg_cutleaves works from the leaves of your installed ports inwards to
the root.  It will invite you to delete ports that are "leaf" ports,
i.e., ones that have no ports depending upon them.  As you cut
unnecessary leaves, more leaves become available for trimming.
Eventually, you'll either cut back to something you're happy with, or
you'll end up deleting everything. :-)

You can create a /usr/local/etc/pkg_leaves.exclude file detailing ports
you never want to cut.  (I add to this file as I add ports to my system
that I want to keep.)  This is handy for reducing the amount of trimming
questions you're offered and generally helps speed up the whole process.

So, I suggest you use sysutils/pkg_cutleaves as a clean solution to the
port de-installation problem.

Cheers,

Paul.
-- 
e-mail: paul at gromit.dlib.vt.edu

"Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid."
        --- Frank Vincent Zappa


More information about the freebsd-questions mailing list