Macports Commands and Tips

root's picture

Clean all installed:
gz@osx~# port clean --all installed

Clean all:
gz@osx~# port -f -p clean --all all

Upgrade all installed:
gz@osx~# port -v upgrade installed

Upgrade all outdated packages:
gz@osx~# port -v upgrade outdated

Uninstall all inactive:
gz@osx~# port -vf uninstall inactive

Uninstall all from one category:
gz@osx~# port -v uninstall category:gnome

Upgrade port itself (will do the sync too):
gz@osx~# port -v selfupdate

Check to which package provides the given file:

fmbp16:~ bah$ port provide /opt/local/bin/gdd
/opt/local/bin/gdd is provided by: coreutils

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.