How to Disable Automatic Updates in Ubuntu 24.04

The article outlines methods to disable automatic updates in Ubuntu 24.04, emphasizing user control over system updates. Users can enhance security and performance through automatic updates but may opt for manual control to prevent conflicts, especially in production environments. Key methods include uninstalling the unattended-upgrades package or modifying configuration files.

This article explains how to disable automatic updates in Ubuntu 24.04.

Ubuntu automatic updates are a feature that allows the operating system to automatically download and install updates for the system and installed software without user intervention. This includes security patches, bug fixes, and sometimes new features.

By enabling this feature, users can benefit from timely updates that help protect against vulnerabilities and improve the overall performance of their system.

However, suppose you need more control over your system updates. In that case, you can disable the automatic updates feature and take control of when and what updates are installed, especially in a production environment.

If you’re running critical applications, you should thoroughly test updates before deploying them to avoid updates that could overwrite their changes or configurations.

Overall, while automatic updates can enhance security and convenience, there are valid reasons why someone might disable them in favor of manual control.

There are multiple ways to disable the automatic update feature in Ubuntu. Below are some of the ways you can do that.

Uninstall the unattended-upgrades package

Ubuntu uses the unattended-upgrades package to update the OS. If you uninstall it, automatic updates will be disabled on the 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 uninstall the unattended-upgrades package in Ubuntu completely, you can disable automatic updates using 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:

In summary, disabling automatic updates in Ubuntu can provide better control over your system’s software management. 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.

Richard Avatar

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *