How to disable automatic updates on Ubuntu

Last updated on September 5, 2020 by Dan Nanni

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 EditSoftware Sources. Choose Never for Automatically check for updates.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal (Credit Card) or Bitcoin (BTC Wallet: 1M161JGAkz3oaHNvTiPFjNYkeABox8rb4g).

Xmodulo © 2020 ‒ About ‒ Powered by DigitalOcean