How To Disable Automatic Updates on Ubuntu 22.04 LTS
In this tutorial, we will show you how to disable automatic updates on Ubuntu 22.04 LTS. Ubuntu, a popular Linux distribution, keeps your system secure and up-to-date by automatically managing updates. While this is undoubtedly a valuable feature, some users may have reasons for wanting to disable automatic updates. Perhaps you have specific needs for manual control or simply prefer to update your system on your own terms.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step disable automatic updates on Ubuntu 22.04. You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.
Prerequisites
- A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Disable Automatic Updates on Ubuntu 22.04 LTS Jammy Jellyfish
Step 1. Disabling Unattended-Upgrades.
Unattended-Upgrades is the package responsible for managing automatic updates on Ubuntu. Before disabling it, let’s check its status:
sudo systemctl status unattended-upgrades
Inspect the output of the above command. If Unattended-Upgrades is active, you’ll see it in the ‘Active’ line. If it’s inactive, you can proceed to the next step.
To disable Unattended-Upgrades, run the following command:
sudo systemctl stop unattended-upgrades sudo systemctl disable unattended-upgrades
To ensure that Unattended-Upgrades has been successfully disabled, run the status command again:
sudo systemctl status unattended-upgrades
Step 2. Turning Off Apt-Daily Services.
Apt-Daily services are responsible for checking and downloading updates daily. You can stop and disable these services using the following commands:
sudo systemctl stop apt-daily.service sudo systemctl stop apt-daily-upgrade.service sudo systemctl stop apt-daily.timer sudo systemctl stop apt-daily-upgrade.timer
Now, disable them:
sudo systemctl disable apt-daily.service sudo systemctl disable apt-daily-upgrade.service sudo systemctl disable apt-daily.timer sudo systemctl disable apt-daily-upgrade.timer
Ensure that Apt-Daily services are no longer active by running:
systemctl list-timers --all
To verify that the services are no longer running, use:
systemctl status apt-daily.service systemctl status apt-daily-upgrade.service
Step 3. Disable Automatic Updates via GUI.
Now open the “Software & Updates” utility and check under the Updates tab, look for “automatically check for updates,” and change this option to never:
Step 4. Best Practices for Managing Updates.
1. Regularly Monitoring Security Updates
Stay informed about security updates by subscribing to Ubuntu’s security notices. Address security patches promptly to keep your system secure.
2. Creating Backup and Restore Points
Before making significant changes, create backups or snapshots of your system. In case something goes wrong during updates, you can revert to a stable state.
3. Keeping Track of Software Sources
Be cautious about adding external software sources. These can affect your system’s stability and security. Stick to official Ubuntu repositories whenever possible.
While automatic updates are essential for security and stability, it’s crucial to choose an update strategy that aligns with your specific needs and expertise. Ultimately, the decision to disable automatic updates should be made after considering the implications and alternatives.
Congratulations! You have successfully disabled automatic updates. Thanks for using this tutorial to disable automatic updates on your Ubuntu system. For additional help or useful information, we recommend you check the official Ubuntu website.