ObjectiveThe objective is to disable automatic updates on Ubuntu 18.04 Bionic Beaver
Operating System and Software Versions
- Operating System: - Ubuntu 18.04 Bionic Beaver
RequirementsPrivileged access to your Ubuntu System as root or via
sudocommand is required.
- # - 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
Other Versions of this TutorialUbuntu 20.04 (Focal Fossa)
InstructionsWarning:Disabling automatic updates comes with a security risk. Once automatic updates are disabled, use
$ sudo apt updateand
$ sudo apt upgradeto keep your system updated manually.
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
aptlocked 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 LineEdit
/etc/apt/apt.conf.d/20auto-upgradesto disable automatic updates from the command line:
$ sudo nano /etc/apt/apt.conf.d/20auto-upgradesOnce you have the file opened, switch off the
0as shown below on Line 1:
APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "1";