Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to be sure if automatic updates are enabled on Ubuntu 12.04 server.

How exactly can I check this?

And how can I disable automatic updates if it's enabled?

share|improve this question

3 Answers

up vote 6 down vote accepted

There is a package that can be used to do this for you. Linky

sudo apt-get install unattended-upgrades

That is the package you need to install. Once its installed edit the file

/etc/apt/apt.conf.d/10periodic

In that file you can set how often you want the server to update.

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";

The file should look like that. The 1 means it will update every day. 7 is weekly.

/etc/apt/apt.conf.d/50unattended-upgrades

This file will let you chose what updates you want to make by choosing where apt can search for new updates and upgrades. ( My personal opinion on this is I would set it to security if this is a server )

Unattended-Upgrade::Allowed-Origins {
        "Ubuntu lucid-security";
//      "Ubuntu lucid-updates";

};

Your file will look like this obviously this is for 10.04 so you will need to change the file sources to precise but the same functionality is there. I would remove the updates one and just leave security.

This is the link above condensed into a smaller package with my thoughts.

Thanks Bill

share|improve this answer

I upgraded our servers from 10.04 LTS to 12.04.1 LTS. They had automatic updates enabled and working in 10.04, but after upgrading to 12.04.1 automatic updates did not work.

I hope this will resolve my issue:

AutomaticSecurityUpdates - Under the "Using the "unattended-upgrades" package" section: https://help.ubuntu.com/community/AutomaticSecurityUpdates

I have also modified /etc/apt/apt.conf.d/20auto-upgrades to look like this since I want all updates, not just security updates to be applied:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
share|improve this answer

Automatic Updates are enabled by default. If not, to enable automatic updates, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install unattended-upgrades

For more information, and how to configure these updates, see Ubuntu Documentation

In server, you can also you can edit /etc/apt/apt.conf.d/50unattended-upgrades, and comment out update update you don't want to upgrade automatically. These edit must be done with root privileges.

share|improve this answer

Your Answer

 
discard

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.