Disable Automatic Updates on Ubuntu 22.04 Jammy Jellyfish Linux

In this short tutorial, you will learn how to disable automatic package updates on Ubuntu 22.04 Jammy Jellyfish Linux. You will see how to disable automatic updates via both command line and GUI. Although this goes against general security recommendations, this will prevent your package manager from being tied up in the background when you need to use it.

In this tutorial you will learn:

  • How to disable Automatic Updates from GUI Desktop
  • How to disable Automatic Updates from command line
Disabled Automatic Updates on Ubuntu 22.04 Jammy Jellyfish Linux Server/Desktop
Disabled Automatic Updates on Ubuntu 22.04 Jammy Jellyfish Linux Server/Desktop
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Disable Automatic Updates on Ubuntu 22.04 step by step instructions



WARNING
Disabling automatic updates comes with a security risk. Once automatic updates are disabled, use the following two commands to keep your system updated manually.

$ sudo apt update
$ sudo apt upgrade

There are some situations when you may want to disable automatic updates. For example if you receive these error messages:

Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

The above is a result of a triggered automatic updates procedure where apt locked down the /var/lib/apt/lists/lock file, thus the administrator is prevented from installing new packages and is forced to wait until the automatic updates refresh cycle is completed.

How to disable Automatic Updates from command line

  1. Open a command line terminal and then edit the /etc/apt/apt.conf.d/20auto-upgrades file using your favorite text editor, for example nano:
    $ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
    
  2. Copy and paste the following content into the file, replacing whatever is currently in there:
    APT::Periodic::Update-Package-Lists "0";
    APT::Periodic::Download-Upgradeable-Packages "0";
    APT::Periodic::AutocleanInterval "0";
    APT::Periodic::Unattended-Upgrade "1";
    

    When done, exit and save your changes to the file.

All done.

How to disable Automatic Updates from GUI Desktop

  1. From the activities menu search for software and click on the Software & Updates icon.
    Open the Software & Updates application
    Open the Software & Updates application
  2. Select the Updates tab and choose Never from the Automatically check for updates field.
    Disable automatic updates via GUI
    Disable automatic updates via GUI

All done.

Closing Thoughts




In this tutorial, you saw how to disable automatic updates on Ubuntu 22.04 Jammy Jellyfish Linux. This included a command line and GUI method. Both methods work the same so it is up to you which one you choose. Remember to keep your system manually updated in the interest of security and to ensure that you always have the latest patches and features available on your Ubuntu 22.04 system.