How to Disable Automatic Updates in Ubuntu 24.04
Disabling automatic updates in Ubuntu 24.04 stops the operating system from downloading and installing software changes behind your back. Ubuntu uses a built-in background tool called unattended-upgrades to handle these security patches and system updates all by itself.
Turning off this feature gives you complete control over your PC so you can check and install updates only when you are ready. You can easily turn off these background routines by editing a simple configuration file or using the terminal.
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
Uninstalling the unattended-upgrades package (which Ubuntu uses to update the OS) offers one route to halt background updates. Running the command below will disable automatic updates on your system.
To uninstall the package, run the command below.
Stopping background updates involves editing the `/etc/apt/apt.conf.d/20auto-upgrades` file without removing any installed programs. Open `/etc/apt/apt.conf.d/20auto-upgrades` in a text editor by running `sudo nano /etc/apt/apt.conf.d/20auto-upgrades`. Then, change the value from ‘1’ to ‘0’ within the file.
To do that, run the command below to open the file.
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
Then, change the values to '0' to disable both 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
Systemd (a suite of system management tools) offers another quick route to halt background update routines. Stop these updates immediately by running the command: sudo systemctl disable --now unattended-upgrades. This command turns off the automatic update service right away.
Run the command below to do that.
sudo systemctl disable --now unattended-upgrades
That completes the process.
Conclusion:
Disabling automatic updates grants greater control over system software management. Review these key points before proceeding:
- 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.
Weigh system requirements carefully before choosing the update strategy that fits best.
How do I disable unattended upgrades in Ubuntu 24?
To disable unattended upgrades, 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!