Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've used the apt family of package managers for some time and started using macports last year when I got a laptop. I'm at a bit of a loss at the best way to keep packages up-to-date though, and any other maintenance tasks I should be looking out for.

My question is, beside periodically using port upgrade on specific packages, what is the workflow for getting regular security and package updates?

share|improve this question
up vote 4 down vote accepted

I run the following

port -v sync # sync the latest definitions
port -v outdated # see what's outdated
port -v upgrade outdated # upgrade what's outdated

You can run

port -v selfupdate

every so once in a while to upgrade the MacPorts software itself. It's only infrequently updated, so I only do this when I know there is a new release.

share|improve this answer
Thanks, I tried out your method. The compile is taking forever after 10 months of no updates though :-\ – Dana the Sane May 29 '09 at 18:49
You don't mean the compile, but the update check? If you don't have many ports installed, then you won't see many updates. Also, not all packages update frequently. Also, you could subscribe to an RSS feed off of commits to see what packages have been updated – Blair Zajac May 29 '09 at 20:59
I have a fair number of ports installed to make my system closer to a recent linux distro. The compile ended up taking at least 12 hours. – Dana the Sane Jun 12 '09 at 20:43
There's no harm in always running selfupdate in place of sync. – Nerdling Aug 26 '09 at 12:19

Every week or two, I do

port selfupdate
port upgrade installed

This is basically the equivalent of

apt-get update
apt-get upgrade

if you are familiar with Debian/Ubuntu.

share|improve this answer

Sync and update if newer version of MacPorts itself is released.

sudo port -v -d selfupdate

List new packages

port outdated

Update all packages

sudo port -v upgrade outdated

After update old versions are not removed but set "inactiv". To clean up:

sudo port -v uninstall inactive

From time to time I run this. It cleans up downloads and left over files from previous builds.

sudo port clean -f --all "*"
share|improve this answer
If you happen to use archive mode, clean --all is probably not something you want to use. – Nerdling Aug 26 '09 at 12:20

The easiest way to find out what packages are out of date is to run port outdated. I'm not aware (and couldn't find when researching my facts) of an RSS feed or something similar to let you know when ports are updated. However you could run a script every week or something similar to check to see what is outdated and let you know.

Personally I check my port installations once a month or so manually.

share|improve this answer
How do you update the list of outdated ports? port selfupdate – Nerdling Aug 26 '09 at 12:21
I run sudo port upgrade outdated – Chealion Aug 26 '09 at 17:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.