Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the best way to automatically apply security updates? Or any updates for that matter?

share|improve this question
There is a package called unattended-upgrades which by default applies security updates automatically, I think it can also do any kind of updates with the right configuration (as long as the package does not need the user to configure anything upon an upgrade). – Graham Edgecombe Oct 18 '10 at 19:08
up vote 2 down vote accepted

This answer to the desktop upgrade question will apply to servers.

share|improve this answer

Note that some updates (on a server, it tends to be most updates, from personal experience) require restarting one or more services, or even rebooting the entire server, to take effect. Restarting services, much less rebooting, isn't really a task I feel comfortable automating.

I use cron-apt on my server to automate downloading, but not installing, updates. It does it once a day rather than running as a daemon. It emails me when there are updates waiting to install.

When I receive such an email, I log in when it is convenient and install the updates, then restart whatever services need restarting.

It's not usually obvious which services need to be restarted. For example, an update to libssl usually requires restarting just about every web, mail, SSH etc service there is. Or an update to libpng might require restarting Apache because PHP links to it.

So I use checkrestart to check which services should be restarted after each update. This is provided by the debian-goodies package.

I also know that if the kernel is updated, I always need to reboot.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.