How to disable automatic updates on Ubuntu

Question: I noticed that some packages (even the Linux kernel) are automatically upgraded on Ubuntu. I do not want my system to be updated silently. How can I disable automatic updates on Ubuntu (server or desktop)?

On Ubuntu, automatic updates are managed by a package called unattended-upgrades which is installed by default. This package downloads and installs security updates automatically. Optionally, it can also auto-upgrade packages available from other configured APT sources (such as "updates", "proposed" "backports"). If you want to disable automatic updates on Ubuntu, there are several ways to do it.

Method One

One way to turn off automatic upgrade is to reconfigure unattended-upgrades. To do so, edit its configuration at /etc/apt/apt.conf.d/50unattended-upgrades.

You can selectively disable individual APT sources to auto-update, by commenting out corresponding sources in "Unattended-Upgrade::Allowed-Origins":

Unattended-Upgrade::Allowed-Origins {
//      "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";

You can also selectively disable auto-update on a package level, by adding package names to "Unattended-Upgrade::Package-Blacklist":

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

Method Two

If you can disable auto-update system-wide, you can add the following info in /etc/apt/apt.conf.d/10periodic.

$ sudo -e /etc/apt/apt.conf.d/10periodic
APT::Periodic::Unattended-Upgrade "0";

The above setup will disable unattended-upgrade altogether.

Method Three

If you are using Ubuntu Desktop, you can also turn off auto-update via Ubuntu Software Center. Open Ubuntu Software Center, and go to Edit --> Software Sources. Choose "Never" for "Automatically check for updates".

Download this article as ad-free PDF (made possible by your kind donation): 
Download PDF

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

One thought on “How to disable automatic updates on Ubuntu

  1. Not sure that I agree with the suggested setting for the Ubuntu Desktop. I would always want to be notified of updates, particularly security updates. Just because I get a list of updates, does not necessarily mean that I HAVE to install them.

    One thing that I do is change the setting for Notify me of a new Ubuntu version to never. I run 12.04 which is an LTS. If I want to upgrade, then I can, but if I am changing to a new Ubuntu version, then I will generally do a clean installation of the new version and restore my documents, pictures, etc. from a backup.

Leave a comment

Your email address will not be published. Required fields are marked *