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
Then, run the below command to uninstall the unattended-upgrades package:
sudo apt remove unattended-upgrades -y
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
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
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:
Now, in the Updates section, select “Never” from the “Subscribed to” drop-down menu, and lastly click Close to apply settings:
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.