In this short tutorial you will learn how to disable automatic package updates on Ubuntu 20.04 Focal Fossa Linux.

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 20.04 Focal Fossa Linux Server/Desktop
Disabled Automatic Updates on Ubuntu 20.04 Focal Fossa Linux Server/Desktop

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed Ubuntu 20.04 or upgraded Ubuntu 20.04 Focal Fossa
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 20.04 step by step instructions

Warning:Disabling automatic updates comes with a security risk. Once automatic updates are disabled, use $ sudo apt update and $ sudo apt upgrade to 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 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 and edit the /etc/apt/apt.conf.d/20auto-upgrades using the bellow command:
    $ sudoedit /etc/apt/apt.conf.d/20auto-upgrades
    
    Change content:
    FROM:
    APT::Periodic::Update-Package-Lists "1";
    APT::Periodic::Unattended-Upgrade "1";
    
    TO:
    APT::Periodic::Update-Package-Lists "0";
    APT::Periodic::Download-Upgradeable-Packages "0";
    APT::Periodic::AutocleanInterval "0";
    APT::Periodic::Unattended-Upgrade "1";
    
    All done.

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


How to disable Automatic Updates from GUI Desktop



  1. From the activities menu search for Software and click on Software & Updates icon.
    From the activities menu search for software and click on Software & Updates icon.


  2. Select Updates tab and choose Never from the Automatically check for updates field.
    Select Updatestab and choose Never from the Automatically check for updates field.
  3. All done.
FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions