How to Disable Automatic Updates in Ubuntu

Automatic updates should be convenient, and it should keep your system secure. But they can also be annoying, and sometimes it’d be better if the system just let the user decide when to update. In this guide, we’ll go through the steps to disable automatic updates and unattended upgrades in Ubuntu Linux.

Automatic updates are usually something you don’t want to disable. They include important security and feature updates, and the user doesn’t need to remember to retrieve them manually. You should only disable automatic updates if you have a unique case and are not a casual Linux user.

The biggest cases for disabling these updates may be that they happen at inopportune times, or the annoyance of trying to install a package when Ubuntu is trying to retrieve updates and gives you the “could not get lock” error.

Could not get lock error in Ubuntu Linux

There are two ways we can disable automatic updates in Ubuntu, either by GUI or command line. We’ll go over both methods in the sections below.

Disable Automatic Updates via GUI

1. Start by opening the “Software & Updates” utility.

Opening software and updates utility

2. Under the Updates tab, look for “automatically check for updates,” and change this option to never.

Changing automatic update frequency to never

3. You’ll be asked for the admin password when making this change. Enter it, then close this menu with the Close button in the bottom right corner. The change has now been finalized.

Disable Automatic Updates via Command Line

The command line method involves editing the /etc/apt/apt.conf.d/20auto-upgrades file.

1. Use nano or your favorite text editor to open it up.

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

2. Set the values in this file to 0.

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

3. Save your changes to the file and exit. The change has now been finalized.

APT auto upgrades configuration file


Automatic updates in Ubuntu are not only a security feature, but also meant for user convenience. Still, Linux professionals may find themselves in an environment where these updates can be an annoying obstacle, especially on test machines. In the end, Linux always gives us a way to customize our systems. Just exercise caution when doing so.


Leave a Reply

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