Edited 6 months ago by ExtremeHow Editorial Team
Auto-UpdatesUbuntuConfigurationLinuxOperating SystemsMaintenanceAdministrationSystemSecuritySoftware
This content is available in 7 different language
Ubuntu is a popular and user-friendly Linux distribution used by many people around the world. One of its features is the ability to handle updates automatically. By default, Ubuntu is set to automatically download and install security updates to ensure that your system remains as secure as possible. While this is great for maintaining a healthy and secure environment, there are times when you may want to disable automatic updates. This can be for a variety of reasons, from lack of bandwidth to the need to test applications in a controlled environment. In this guide, we will dive deep into the methods and steps to disable automatic updates on Ubuntu systems, ensuring that you have full control over when and how updates are applied.
Automatic updates in Ubuntu are managed through a tool called the “Unattended Upgrades” package. This tool handles the automatic downloading and installation of security and package updates. When the system is configured with its default settings, these updates happen silently in the background without interrupting your work. However, this auto-update feature may not always align with specific needs or environments.
Ubuntu, being open-source, allows users to modify settings and configurations as they wish. This flexibility extends to managing how updates are applied to the system. So, you can disable these automatic updates if they don’t suit your specific circumstances.
There are several ways to disable automatic updates on an Ubuntu machine. I will tell you about the most common ways to achieve this.
If you prefer using the graphical user interface, you're in luck. Disabling automatic updates through the GUI in Ubuntu is straightforward. Here's a step-by-step guide:
Click "Activities" or press the "Super" key (often the Windows key on your keyboard) to bring up the Applications menu. Find "Software & Updates" and click the icon to open it.
In the "Software & Updates" window, find the "Update" tab. This tab contains settings related to updating your system.
Here you will find several options. Look for “Automatically check for updates” and change this setting to “Never”. Also, under “When there are security updates”, you may find options like “Automatically download and install”, “Display immediately”, etc. Set them according to your preference. However, selecting “Never” for automatic checking should be enough to disable automatic updates completely.
For more control and understanding, you can choose to disable automatic updates by editing the configuration files directly. This method is best suited for users who are comfortable using the terminal and making changes to system files.
Press Ctrl + Alt + T
to open a Terminal window.
You will need to edit the "50unattended-upgrades" configuration file. Before proceeding, make sure you have backup copies of the files you are going to edit. Use the command:
sudo cp /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/50unattended-upgrades.bak
This command creates a backup of the original file. Now, open the file for editing:
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
In this file, you will see many directives beginning with "//". These are comments and help explain sections of the configuration. To disable automatic updates, edit or comment out the necessary lines related to upgrade actions.
Consider changing the following settings:
Unattended-Upgrade::Automatic-Reboot "false";
After making the necessary changes, exit the editor by pressing Ctrl + O
to save and Ctrl + X
to close.
This method involves using entirely command line tools. This is beneficial for automated setup or when GUI access is unavailable.
Press Ctrl + Alt + T
to open the terminal.
Use the following command to prevent updates from being installed automatically:
sudo systemctl disable apt-daily-upgrade.service
and this too:
sudo systemctl disable apt-daily-upgrade.timer
sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily.timer
To verify that the services have been disabled, you can check their status:
systemctl list-units --type=service | grep apt-daily
Although automatic updates provide a convenient way to keep your system up to date with the latest features and security patches, there are some scenarios where it may be better to disable them:
On systems with limited bandwidth, automatic updates may consume network resources unexpectedly.
In environments where stability is critical, immediate updates may cause conflicts with existing software configurations or generate unexpected bugs.
On development machines or during software testing, you may need to keep the system stable without any interim updates, thereby making no changes to the environment.
If you decide to re-enable automatic updates later, you can reverse the changes. Simply revisit the methods above and adjust the settings to allow updates once again.
Managing updates effectively is critical to maintaining your system's performance and security. By understanding and controlling how Ubuntu handles updates, you can tailor your system to your specific needs. While automatic updates ensure you're running the latest secure version, circumstances vary and the ability to disable these updates is a powerful feature. Whether through the GUI, configuration files, or the command line, Ubuntu offers flexibility and control, demonstrating the adaptability that makes Linux distributions so widely used and respected.
If you find anything wrong with the article content, you can