Automatic notification of Debian package updates via cron

Very simple, and hinted at in the Debian APT HOWTO. I think I used to use a different package for this, but I think I like the simplicity of this method better. After installing apt-show-versions, I made the following entry in root’s crontab:

@daily apt-get -q -q update 2> /dev/null && apt-show-versions -u

root gets mail if apt-show-versions generates output, indicating new packages are available. That mail is redirected to my user account on the system, which is then scooped up by gmail where I see it and act upon it. I could automate the entire update process, especially since the stable release’s updates are seldom and safe (ie: security fixes are backported), but I’d rather do it myself to be extra careful.

4 thoughts on “Automatic notification of Debian package updates via cron”

  1. The package daptup does this.
    I don’t know whether it’s in Lenny.

  2. Alternatively, just “aptitude install cron-apt” and you will get exactly the same setup. cron-apt is also highly configurable — you can get it to download the updates but not install them (making the process of installing the updates much faster) or you can even get it to install updates from a trusted repository if you wish.

  3. Ah, yes…cron-apt was the package I had used in the past. I’ll have to check that out again.

Leave a Reply

Your email address will not be published. Required fields are marked *