Categories: Ubuntu

Enable Disable Unattended Upgrades in Ubuntu

Update packages are essential for the system to protect the data because these packages have specific security patches. However, Ubuntu’s feature called Unattended Upgrades installs all of the latest security-related updates automatically.

This feature is enabled by default in the newest Ubuntu versions. Due to this auto-update feature, sometimes users face different errors, so for example, when users login after updating the system, they see the error message like this:

Sponsored

for example, when users force reboots their system in updating procedure, then they get this error message:

Therefore, this automatic update feature helps keep your system up to date but is very annoying for some users. If you also find this feature irritating, read our article to understand the complete procedures to enable/disable unattended upgrades in Ubuntu.

But before we discuss the procedure, we want to give a brief answer on “is it good to disable auto-updates in Ubuntu?” Remember that it is a security-related feature, and Linux allows users to keep their systems up to date. So, it is not good to disable auto-updates because it keeps the system safe. In case you disable auto-updates in Ubuntu, then make sure to update your system manually for your system’s security.

How to Enable/Disable Unattended Upgrades in Ubuntu

We will describe two procedures that you can use to enable/disable auto-updates easily for more convenience.

Enable/Disable unattended upgrades Using Command Line

There are multiple disable Unattended upgrades in Ubuntu using command lines, so ensure you use them correctly.

You need to edit the /etc/apt/apt.conf.d/20auto-upgrades for disabling unattended upgrades in Ubuntu. So, open the Linux terminal and execute the following command line:

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

After executing the command, change the directives of Update-Package-Lists from 1 to 0.

APT::Periodic::Update-Package-Lists “0”;
APT::Periodic::Unattended-Upgrade “1”;

In case you don’t an automatic update checking option, then change the directive like this:

APT::Periodic::Update-Package-Lists to 0.

In case you want to let your system check the regular update but don’t want to install them, then change the value from 0 to 1 like this:

APT::Periodic::Update-Package-Lists “1”;

APT::Periodic::Unattended-Upgrade “0”;

Sponsored

If you change the value of periodic::Unattended-Upgrade from 0 to 1, then your system will check the updates every day. After changing the value, the command will look like this:

APT::Periodic::Update-Package-Lists “0”;

APT::Periodic::Unattended-Upgrade “1”;

If you want to disable these automatic updates the right way, then run the below command in the terminal:

$ sudo dpkg-reconfigure unattended-upgrades

After executing the command, change the select No and press Enter button to disable unattended upgrades.

For removing this feature permanently, use the below command line:

$ sudo apt remove unattended-upgrades

This command will not harm other software or features of your Ubuntu system.
Once you disable unattended upgrades, then make sure to run these commands to update your system manually:

$ sudo apt update
$ sudo apt upgrade

Enable/Disable unattended upgrades Graphically

Open the software & updates from the main menu search button.
In the software & updates option, go to the Updates section and find “Automatically check for updates“. You will see that it is already set to daily, and it is a by-default selection.

Change this by default option to Never so that it will turn the automatic updates download to never, and your system will not download it again.

Conclusion

This is how you can easily disable unattended upgrades in Ubuntu, and we aim to provide a different procedure to do it easily. As we have mentioned, it is a by default enabled feature that keeps your system up to date, but it is also annoying for many users due to the errors. You can disable these auto-updates but update your system manually as it is essential to maintain your data security in the system.

Ubuntu Server Admin

Recent Posts

How is Livepatch safeguarded against bad actors?

Canonical Livepatch is a security patching automation tool which supports reboot-less security updates for the…

1 hour ago

Accelerating data science with Apache Spark and GPUs

Apache Spark has always been very well known for distributing computation among multiple nodes using…

1 hour ago

Cut data center energy costs with bare metal automation

Data centers are popping up everywhere. With the rapid growth of AI, cloud services, streaming…

1 day ago

Build the future of *craft: announcing Starcraft Bounties!

Our commitment to building a thriving open source community is stronger than ever. We believe…

1 day ago

NodeJS 18 LTS EOL extended from April 2025 to May 2032 on Ubuntu

The clock was ticking: Node.js 18’s upstream End of Life (EOL) The OpenJS Foundation is…

1 day ago

Native integration now available for Pure Storage and Canonical LXD

June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…

2 days ago