You're at Mabishu, a website about discovering quality on code, searching emerging technologies, and leading a simpler, more mindful coder life. This site was established in 2005 by Fran Diéguez, a blogger, software developer, and open source geek. Subscribe to the RSS feed for updates.

Automatic upgrades on Ubuntu with apt and cron

Written on January 22nd, 2010
.

If you want to get automatic upgrades of your personal repositories I haven’t find a way to get managed with unattended-upgrades so I have done the next wordarround.

This way is to use apt-get and crontab together, so open your crontab editor:

sudo crontab -e

And type the next line to execute our upgrade every night at 1AM:

0 1 * * * (/usr/bin/aptitude -y update && /usr/bin/aptitude -y safe-upgrade) 2>&1 >> /var/log/auto_update.log

Save and exit your editor, and you are all set! You could check the logfile: /var/log/auto_update.log every once in a while to see if everything is still running smoothly.

Note: If you have a solution to get to work unattended-upgrades package with custom repositories please fill a comment below.

pixel Automatic upgrades on Ubuntu with apt and cron

Might be interested on:

Leave a Response