If you’re administering your server in Ubuntu, you might want to set up a cron to update and upgrade your software each night. There’s an easy way to do this thanks to the convenient Ubuntu package cron-apt.
To automate daily bug and security updates to your Linux system, first install cron-apt with the following command:
apt-get install cron-apt
Then configure it to email you the results each time it runs, edit /etc/cron-apt/config to include the following lines:
MAILTO="you@emailaddress.com" MAILON="always"
Lastly, link it to cron.daily by running the following command:
sudo ln -s /usr/sbin/cron-apt /etc/cron.daily/
This should keep your system nicely up-to-date. If you’re feeling a little wild (and you’ve backed up everything), you might also want to upgrade to the latest version of Ubuntu every once in a while (but this should never be automated).