5

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?

4

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.

4
  • 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 trac.macports.org/timeline – 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. – Jeremy L Aug 26 '09 at 12:19
4

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.

4

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 "*"
1
  • If you happen to use archive mode, clean --all is probably not something you want to use. – Jeremy L Aug 26 '09 at 12:20
1

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.

2
  • How do you update the list of outdated ports? port selfupdate – Jeremy L Aug 26 '09 at 12:21
  • I run sudo port upgrade outdated – Chealion Aug 26 '09 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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