Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Dec 2004 12:56:20 -0500
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        freebsd-questions@freebsd.org
Cc:        Brett Glass <brett@lariat.org>
Subject:   Re: Un-GNOME-ing a FreeBSD box
Message-ID:  <1102874180.8276.26.camel@zappa.Chelsea-Ct.Org>
In-Reply-To: <20041212120049.9ABA516A583@hub.freebsd.org>
References:  <20041212120049.9ABA516A583@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 11 Dec 2004 18:54:18 -0700, Brett Glass <brett@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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1102874180.8276.26.camel>