Installing Security Updates Automatically

When I first installed my server, I was given the option of installing updates automatically. At the time I reckoned it would be better if I did it all manually, and so chose to install all updates manually. This includes security updates. The best option is to allow Ubuntu to install security updates automatically, and leave any application upgrades to when you want to do them manually.

The package we use to manage all of this is called unattended-upgrades. This can be used to automatically install updated packages, and can be configured to update all packages or just install security updates.

To check firstly if you have allowed automatic installation of security upgrades, type

sudo debconf-show unattended-upgrades

if this shows True, then this is running already. If it is false, and you want to allow it (as you should), run

sudo dpkg-reconfigure unattended-upgrades

Select Yes to confirm you want to install the security updates and the server will set this up for you.