Recursive uninstall?

David Liontooth liontooth at cogweb.net
Mon Apr 16 09:31:42 PDT 2007


David Kulp wrote:
> Howdy.  Is there a way that I can recursively uninstall a port and its
> dependencies?  Somehow I have gnome-session installed with a zillion
> dependencies -- most of which have no other dependents.  I don't know
> why it bugs me, but I want to uninstall all this mess that I don't use.
>
> a) Is there a hidden uninstall option that recursively removes
> dependencies if said port has no other dependents?
>
> b) Assuming not, can someone point me to the database describing the
> dependencies, so I could write a script to traverse the dependency
> tree?  Recursively calling "port deps" is slow.  If anyone else is
> interested in this script, I'll post it.
Please do; it would be very useful (assuming nothing like it exists; I'm
new to macports). In files called Portfile in this type of location,

/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/multimedia/ffmpeg

you'll find this sort of thing:

# Adds MP3 support
variant lame {
        depends_lib-append port:lame
        configure.args-append --enable-mp3lame
}

But even if you have to depend on calling port deps, that's not a big
deal -- it's not as if the script has to be run that frequently, so
speed is not critical.

BTW I found out about the location above by running port install with
the -v and -d flags; see man port.

Cheers,
Dave



More information about the macports-users mailing list