Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

4 Answers 4

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 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. –  Nerdling Aug 26 '09 at 12:19

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

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

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

 
discard

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.