Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

When I installed the Ubuntu 12.04 Server in my VM, I chose to manually update security.

My question is how can I enable it again? I know there are other packages that do auto update, but I'm just looking for a simple solution to turn it back on.

share|improve this question

marked as duplicate by Mitch, Javier Rivera, Kevin Bowen, Radu Rădeanu, Seth Jul 29 '13 at 21:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

The unattended-upgrades package can be used to automatically install updated packages, and can be configured to update all packages or just install security updates. First, install the package by entering the following in a terminal:

sudo apt-get install unattended-upgrades

To configure unattended-upgrades, edit /etc/apt/apt.conf.d/50unattended-upgrades and adjust the following to fit your needs:

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

Certain packages can also be blacklisted and therefore will not be automatically updated. To blacklist a package, add it to the list:

Unattended-Upgrade::Package-Blacklist {
//      "vim";
//      "libc6";
//      "libc6-dev";
//      "libc6-i686";
};

The double “//” serve as comments, so whatever follows "//" will not be evaluated.

To enable automatic updates, edit /etc/apt/apt.conf.d/10periodic and set the appropriate apt configuration options:

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

The above configuration updates the package list, downloads, and installs available upgrades every day. The local download archive is cleaned every week.

The results of unattended-upgrades will be logged to /var/log/unattended-upgrades.

Source - The official Ubuntu Server documentation.

https://help.ubuntu.com/12.04/serverguide/automatic-updates.html

share|improve this answer

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