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
|Category||Requirements, Conventions or Software Version Used|
|System||Ubuntu 22.04 Jammy Jellyfish|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Disable Automatic Updates on Ubuntu 22.04 step by step instructions
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
- Open a command line terminal and then edit the
/etc/apt/apt.conf.d/20auto-upgradesfile using your favorite text editor, for example
$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
- 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.
How to disable Automatic Updates from GUI Desktop
- From the activities menu search for
softwareand click on the
Software & Updatesicon.
- Select the
Updatestab and choose
Automatically check for updatesfield.
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.