How to Disable Automatic Updates in Ubuntu 24.04
You disable automatic updates in Ubuntu 24.04 by modifying the configuration of the unattended-upgrades package.
Automatic updates in Ubuntu are a feature designed to install software, including vital security patches and bug fixes, without user intervention. This process typically runs in the background, ensuring your system stays current.
While these updates are generally beneficial, you might want to disable them. Perhaps you manage a server where stability is paramount, or you need to test new versions of software before they are automatically applied to your environment.
By default, Ubuntu 24.04 enables automatic security updates. This guide will walk you through the steps to turn them off.
You can disable automatic updates in Ubuntu 24.04 by uninstalling the unattended-upgrades package using `sudo apt remove unattended-upgrades`. Alternatively, edit the `20auto-upgrades` file to set update values to “0” or disable the unattended-upgrades service with `sudo systemctl disable –now unattended-upgrades`.
Uninstall the unattended-upgrades package
One way to disable automatic updates is to uninstall the unattended-upgrades package, which Ubuntu uses to update the OS. Running the command below will disable automatic updates on your system.
To uninstall the package, run the command below.
sudo apt remove unattended-upgrades
Disable automatic update via the 20auto-upgrades file
If you don’t want to remove the unattended-upgrades package entirely, you can still disable automatic updates by adjusting the 20-auto-upgrade configuration file.
To do that, run the command below to open the file.
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Then, change the value from ‘1’ to ‘0’ to disable both the Update-Package-Lists and Unattended-Upgrade in the file.
PT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
Save the file and exit.
Disable automatic updates via Systemd
Yet another way to disable automatic updates in Ubuntu is to use the Systemd command.
Run the command below to do that.
sudo systemctl disable --now unattended-upgrades
That should do it!
Conclusion:
Disabling automatic updates in Ubuntu gives you more control over how your system’s software is managed. Here are the key points to consider:
- Control: Disabling automatic updates lets you choose when and what updates to apply.
- Testing: Manual updates allow you to test updates in a production environment before implementation thoroughly.
- Avoid Conflicts: Prevents potential conflicts with critical applications relying on specific configurations.
- Methods Available: You can disable automatic updates through package uninstallation, configuration file editing, or Systemd commands.
- Trade-offs: While automatic updates enhance security and convenience, manual control can be crucial for specific environments.
Make sure to evaluate your system’s needs before deciding on the update strategy that works best for you.
How do I disable unattended upgrades in Ubuntu 24?
To disable unattended upgrades, you’ll need to set these options to zero: APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0"; Systemd timer units, apt-daily. timer and apt-daily-upgrade.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!