Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jul 2007 16:58:32 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Jeremie Le Hen <jeremie@le-hen.org>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Keeping track of automatically installed dependency-only ports
Message-ID:  <468ED728.1020209@FreeBSD.org>
In-Reply-To: <20070614070602.GD39533@obiwan.tataz.chchile.org>
References:  <20070614070602.GD39533@obiwan.tataz.chchile.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Jeremie Le Hen wrote:
> Hi,
> 
> Is there a way to track dependency-only ports, so that if I install
> port0 which requires port1 which in turn requires port2 and so on,
> deinstalling port0 will deinstall portN up to the first one required by
> another port or one I explicitely installed.

I realize that this is an old post, but the thread it generated
indicated that there is demand for this kind of functionality, and no
solutions were presented that I could see.

Portmaster actually has what I believe you are looking for. The -e
option will "expunge" an installed port (pkg_delete + option to remove
distfiles) and it will then call the -s option recursively to remove
any "stale" ports that were previously installed as a dependency, but
are no longer depended on. The -s mode prompts the user before
deleting a port, and offers an option to remove the empty +REQUIRED_BY
file which is the hallmark of a port that was once a dependency, but
is no longer.

Finally, portmaster has a -l option to "list" your installed ports
according to categories based on whether they do/don't have
dependencies, and whether they are/aren't depended on. This will give
you a good view of ports that you're not using any more that could be
safely deleted from the "root" and "leaf" categories.

I should also point out that because portmaster uses (and modifies)
only the existing data in the /var/db/pkg directory, all of these
features are available whether you use portmaster to keep your ports
up to date or not.


hope this helps,

Doug

-- 

    This .signature sanitized for your protection



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