There’s nothing more tedious as a system administrator than running security updates on a dozen servers every single day. Luckily Ubuntu will let you automate stable security updates so you’re never at risk.

All you need to do is run this one single command on your server:

sudo dpkg-reconfigure -plow unattended-upgrades

If you get an error about the package not being installed, run this first:

sudo apt install unattended-upgrades

If you are logged in as root you can skip the sudo, of course.

Once you run the command you’ll be presented with a very pink screen that might prompt you to say Ok.

If your terminal was a little wider you probably would see it all on a single page, but either way you’ll be asked if you want to automatically download and install stable updates. Select Yes.

The utility will write out the necessary configuration files, and security updates should become automated. Note that by default it’s going to wait to check once a day, so it’s not like any pending security updates will be instantly installed once you change this setting, but you shouldn’t have to install security updates ever again.

Profile Photo for Lowell Heddings Lowell Heddings
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work.
Read Full Bio »