November 19, 2024
Tutorials

How to Disable Automatic Updates on Ubuntu 24.04: 4 Easy Ways

How-to-disable-auto-updates-in-Ubuntu-24.04

Don’t know how to disable automatic updates on Ubuntu 24.04? Keep reading!

Turning off automatic updates on Ubuntu 24.04 is crucial for maintaining control over system changes, avoiding disruptions, and managing compatibility. It allows you to test updates before applying them prevents unintended changes to customized settings, and also helps to manage resources effectively. 

This guide covers four different methods to disable automatic updates on Ubuntu 24.04, including uninstalling the unattended-upgrades package, editing configuration files, using the command line, and GUI.

Method 1: Uninstalling the unattended-upgrades Package

You can uninstall the unattended-upgrades package to prevent Ubuntu from automatically installing updates. This makes sure that you won’t be interrupted by automatic updates.

Now, run the following command to check whether the unattended-upgrades service is running or not:

sudo systemctl status unattended-upgrades
checking unattended upgrades service on ubuntu 24.04

Then, run the below command to uninstall the unattended-upgrades package:

sudo apt remove unattended-upgrades -y
Removing the unattented upgrades package from ubuntu 24.04

Method 2: Disabling Automatic Updates via 20auto-upgrades File

In this method, we will configure the 20auto-upgrades file. This file defines the time and sequence of automatic updates. In addition, by editing this file, you can take complete control of the automatic updates on your Ubuntu system.

First, open the 20auto-upgrades file with:

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

Then, change the value from ‘1’ to ‘0’. This disables both automatic package list updates and unattended-upgrades:

APT::Periodic::Update-Package-Lists “0”;
APT::Periodic::Unattended-Upgrade “0”;

In the above script:

  • The first command specifically controls how often your system checks automatic updates. 
  • The second command displays the configuration setting for the unattended upgrades feature.

Lastly, run these commands to verify the changes made in the 20auto-upgrades file:

apt-config dump APT::Periodic::Update-Package-List
apt-config dump APT::Periodic::Unattended-Upgrade
re-verifying whether automatic updates are disabled or not

Method 3: Disabling Automatic Updates Using Command Line Interface 

In this method, we will stop the automatic security updates service and prevent it from starting up again when the system boots. This means our system won’t automatically install updates in the background.

To do the same, run this command: 

sudo systemctl disable --now unattended-upgrades
stopping and disabling the unattended-upgrades service on Ubuntu 24.04

Method 4: Disabling Automatic Updates Using Graphical User Interface

Disabling automatic updates on Ubuntu 24.04 via a graphical user interface is most easiest among all the methods. To follow this method, open the Applications menu and type “Software & Update” in the search bar:

launching software and update on ubuntu

Now, in the Updates section, select “Never” from the “Subscribed to” drop-down menu, and lastly click Close to apply settings:

Turning off automatic updates on Ubuntu 24.04

Conclusion

There are several options for disabling automatic updates on Ubuntu 24.04. For instance, you can completely remove the unattended-upgrades package, modify the 20auto-upgrades file to disable automatic updates, use the command line to stop the update service, or adjust settings through the graphical user interface.

So all in all, you can choose any of the methods that suit you best to manage automatic updates on Ubuntu 24.04.

Frequently Asked Questions

Disabling automatic updates can prevent unexpected system changes, allow for manual control over when updates are applied, or help maintain compatibility with specific software or hardware configurations.
Open the Applications menu and search for Software & Update. Go to Updates tab. Change the setting for Automatically check for updates to Never.
Yes! You can. Open the following file in Nano editor: sudo nano /etc/apt/apt.conf.d/20auto-upgrades Set both options to 0: APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";
Yes, disabling updates can leave your system vulnerable to security risks. It is advisable to regularly check for and manually apply updates.
To re-enable automatic updates via the GUI, follow the same steps in Q2 and change the value of Automatically check for updates. In the terminal, set the values back to 1 in the /etc/apt/apt.conf.d/20auto-upgrades file.

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video