How to Disable Unattended-Upgrades on Ubuntu 24.04

Unattended-Upgrades is a useful feature on Ubuntu that automatically installs security updates on your system. However, in some cases, you may want to disable it – perhaps you prefer to manually review and install updates, or you have specific maintenance routines in place. Whatever the reason may be, disabling Unattended-Upgrades is a simple process on Ubuntu 24.04.

To disable Unattended-Upgrades on Ubuntu 24.04, follow these easy steps:

1. Open a terminal window by pressing Ctrl + Alt + T or by searching for “Terminal” in the Dash.

2. Once the terminal is open, type the following command to edit the configuration file for Unattended-Upgrades:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades

3. In the configuration file, you will see a line that says “APT::Periodic::Update-Package-Lists ‘1’;”. This line tells the system to automatically update the package lists. To disable Unattended-Upgrades, change the ‘1’ to ‘0’. The line should now look like this:
APT::Periodic::Update-Package-Lists ‘0’;

4. Next, find the line that says “APT::Periodic::Unattended-Upgrade ‘1’;”. This line tells the system to automatically install security updates. To disable this, change the ‘1’ to ‘0’. The line should now look like this:
APT::Periodic::Unattended-Upgrade ‘0’;

5. Once you have made these changes, save the file by pressing Ctrl + O, and then exit by pressing Ctrl + X.

6. Finally, restart your system by typing “sudo reboot” in the terminal, or by selecting the option to restart from the system menu.

After following these steps, Unattended-Upgrades will be disabled on your Ubuntu 24.04 system. Remember that it is important to regularly check for updates manually and install them promptly to ensure the security and stability of your system.

If you ever wish to re-enable Unattended-Upgrades, simply follow the same steps outlined above, but change the ‘0’ back to ‘1’ in both of the configuration file lines.

Disabling Unattended-Upgrades on Ubuntu 24.04 is a quick and straightforward process that gives you more control over the update process on your system. Whether you prefer to manually manage updates or you have specific requirements for managing maintenance tasks, disabling Unattended-Upgrades allows you to tailor your system to your needs.