Keeping track of automatically installed dependency-only ports
dougb at FreeBSD.org
Fri Jul 6 23:58:42 UTC 2007
Jeremie Le Hen wrote:
> 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,
This .signature sanitized for your protection
More information about the freebsd-ports