Skip to main content
How To

How to Stop Ubuntu Auto-Update (if you really want to)

Don't like Ubuntu updating the installed packages all by itself? Here's how you can stop auto updates in Ubuntu, if you really want to.

Sagar Sharma

Recently, I explained how you can enable auto updates in Ubuntu where the security updates will be installed without the intervention of a user.

However, some users may want to revert back to the previous state to have more control over the system for various reasons.

So in this tutorial, I will walk you through how you can stop Ubuntu auto-update.

Auto updates are an integral part of Ubuntu's offering. They keep your system secure. Only disable them if you really need to. We don't recommend doing it.

Stop auto-update in Ubuntu

To stop auto-update, first, let's check if the unattended-upgrades.service service which is responsible for auto-update is active or not:

systemctl status unattended-upgrades.service
Check if the auto-update is installed or not

If you see a similar result, it means the service is actively running so before you proceed any further, stop the service using the following:

sudo systemctl stop unattended-upgrades.service
If you don't plan to uninstall the service then just stopping won't do it, disable it using this command: sudo systemctl disable unattended-upgrades.service

Once done, open the auto-update configuration file using the following command:

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

And change the value of APT::Periodic::Update-Package-Lists and APT::Periodic::Unattended-Upgrade to zero (0):

APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";
Disable auto update in Ubuntu

Save changes and exit from the nano text editor.

To verify the changes, use the following commands one by one:

apt-config dump APT::Periodic::Update-Package-Lists
apt-config dump APT::Periodic::Unattended-Upgrade

It should give you the following output:

verify if the auto update in ubuntu is disabled or not

That's it!

From now on if you ever need the service up again, revert the changes you've made (change the 0 to 1 again as it was earlier).

Also, make sure to start and enable the service.

But if you don't plan to use this service again and want to uninstall it, then you can use the following command:

 sudo apt remove unattended-upgrades

Here's how to set live patch in Ubuntu

Did you know that you can apply security patches without rebooting your device? Well, it is called live patching and we made a detailed guide explaining how to enable live patching in Ubuntu:

How to Enable Livepatching on Ubuntu Server
Tired of rebooting your Ubuntu server after every security upgrade? You may enable live kernel patching and forget about reboots altogether.

I hope you will find this guide helpful.

Sagar Sharma