MacPorts tips
July 25th, 2009I use MacPorts as a package manager for Mac OS X and used it mindlessly for a long time before learning some basic commands that helped out.
First, to update your MacPorts version to the newest release you can do:
% sudo port selfupdate
That’s really basic and well-documented. To upgrade all your installed packages do:
% sudo port upgrade installed
Finally, MacPorts keeps all your outdated/inactive software around forever. To get rid of inactive ports, do:
% sudo port -f uninstall inactive
If you want to routinely get rid of inactive ports, you can create a script in /etc/periodic/monthly.