I run the MacPorts package management system to keep a few pieces of software up-to-date on my computers. The problem is the software doesn’t get updated frequently enough for me to remember the exact commands I need to use to get the latest versions.
There’s official documentation, so think of this as just a cheatsheet.
- Run
sudo port selfupdate
. This gets the latest version of MacPorts itself, but also updates the list of software versions.
- If you get an error, try running XCode and accepting the licencing agreement if prompted.
- Run
port outdated
. I like to know what software will be upgraded. - Run
port installed
for a full listing of all MacPorts packages installed, including their version numbers. Having this list will make it easier to rollback an upgrade if necessary. - Run
sudo port upgrade outdated
. This actually downloads and compiles the latest versions so it might take a while. - Occasionally run
sudo port uninstall inactive
to free up the space used by the old versions that have been archived.