By default, Ubuntu is configured to automatically download and install security updates and system upgrades in the background. While this is an excellent feature for everyday desktop users, ensuring they remain protected against vulnerabilities, it can be a nightmare for server administrators, developers, or power users.
Automatic updates can consume bandwidth when you need it most, trigger unexpected reboots, or worse — break custom software configurations and dependencies on a production server. If you require absolute control over when and how your system changes, you must disable the automatic update service known as Unattended Upgrades.
Method 1: Disabling Updates via the Desktop GUI
If you are using Ubuntu Desktop with a graphical user interface, you can turn off automatic updates using the built-in system settings.
- Press the Super (Windows) key on your keyboard to open the Activities overview.
- Type Software & Updates and press Enter to launch the application.
- Look at the tabs along the top of the window and click on Updates.
- Find the dropdown menu labeled Automatically check for updates: and change it from “Daily” to Never.
- Find the dropdown menu labeled When there are security updates: and change it from “Download and install automatically” to Display immediately.
- You will be prompted to enter your administrator password to authenticate these changes.
- Click Close. The system will ask if you want to reload the software repositories; you can click Reload or Ignore.
Your Ubuntu desktop will no longer install anything without your explicit permission.
Method 2: Disabling Updates via the Terminal (Server & Desktop)
If you are managing an Ubuntu Server without a GUI, or you simply prefer the speed of the command line, you must edit the configuration files for the unattended-upgrades package.
Editing the Configuration File Directly
The behavior of automatic updates is controlled by a specific file in the APT configuration directory.
- Open your terminal or SSH into your server.
- Open the configuration file using a text editor like Nano:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades - You will see a file that likely contains these two lines:
APT::Periodic::Update-Package-Lists "1";APT::Periodic::Unattended-Upgrade "1"; - Change the
"1"to a"0"on both lines. (The number 1 means enabled, 0 means disabled).APT::Periodic::Update-Package-Lists "0";APT::Periodic::Unattended-Upgrade "0"; - Save the file in Nano by pressing Ctrl + O, Enter, and exit using Ctrl + X.
Completely Removing the Unattended-Upgrades Package
If you want to absolutely guarantee that automatic updates never run — perhaps on a highly sensitive production server — the safest option is to completely remove the package responsible for the behavior.
Run the following command in your terminal:
sudo apt remove unattended-upgrades
This command uninstalls the background service entirely. You will still be able to update your system manually using sudo apt update and sudo apt upgrade, but the system will never attempt to do it on its own.
Important Security Considerations
Disabling automatic updates places the entire burden of system security on your shoulders. Ubuntu receives critical patches for severe vulnerabilities (like kernel exploits or SSL flaws) frequently.
If you turn off automatic updates, you must establish a strict manual maintenance schedule. Running a server that has not been updated in six months is a massive security risk. We recommend setting a calendar reminder to log in and run sudo apt update && sudo apt upgrade at least once a week during your designated maintenance window.