- User ID
- 1
- Joined
- 7 Jan 2019
- Messages
- 943
- Reaction score
- 40
- Points
- 28
Follow these easy steps to disable automatic updates on Ubuntu 20.04 Focal Fossa 
Privileged access to your Ubuntu System as root or via sudo command is required
Conventions
There are some situations when you may want to disable automatic updates. For example, if you receive these error messages:
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.
Disable Automatic Updates from Command Line
Edit /etc/apt/apt.conf.d/20auto-upgrades to disable automatic updates from the command line:
Once you have the file opened, switch off the Update-Package-Lists directive from 1 to 0 as shown below on Line 1:
This tutorial was created based on Ubuntu 18.04 Bionic Weaver, and it should work on 20.04 Focal Fossa too
Don't forget to post your comments or questions down below

Privileged access to your Ubuntu System as root or via sudo command is required

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
There are some situations when you may want to disable automatic updates. For example, if you receive these error messages:
Code:
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.
Disable Automatic Updates from Command Line
Edit /etc/apt/apt.conf.d/20auto-upgrades to disable automatic updates from the command line:
Bash:
$ sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Once you have the file opened, switch off the Update-Package-Lists directive from 1 to 0 as shown below on Line 1:
Rich (BB code):
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "1";
This tutorial was created based on Ubuntu 18.04 Bionic Weaver, and it should work on 20.04 Focal Fossa too

Don't forget to post your comments or questions down below
