Super User is a question and answer site for computer enthusiasts and power users. 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

Is there any way or tool that I can use to receive notifications when any of my macports-packages are out-of-date?

share|improve this question
up vote 1 down vote accepted

How about a cron job which runs port outdated and sends email when something is outdated. It could be as simple as this crontab:

0 6 * * * /opt/local/bin/port outdated | /usr/bin/grep -v "No installed ports are outdated."

This will run at 6:00 am everyday. The grep -v removes the "no updates" line if everything is up to date. The MAILTO sets the address that cron will send output to if anything was written to stdout.

share|improve this answer

My rep is too low to comment on Doug's answer, but don't forget a step to update your repository in the first place! If you don't do that, port outdated can't tell you that anything needs updating, because your installed ports will match your portfiles exactly. However, updating is typically done with sudo port selfupdate. Whether you want to automate scripts with sudo access has pros and cons.

The "proper" way to sync and report on what needs upgrading is:

sudo port selfupdate && port outdated

selfupdate produces a fair amount of output, so I use something like

sudo port sync && port outdated

share|improve this answer
Note that selfupdate would also update your base installation, which is something you probably don't want to happen automatically with a cronjob. – Raim Jun 7 '10 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .