Disable / Turn Off Automatic Update in Ubuntu 16.04 18.04 20.04 Servers

For servers, especially production servers, I prefer automatic updates and upgrades to be turned off. Even security and crucial updates will be turned off.

I prefer turning off automatic update to avoid surprises. There were times newer version of packages cause incompatible issues and breaks web sites and applications.

If you decide to turn off automatic update, make sure to schedule quarterly server maintenance to update SECURITY and CRUCIAL updates. Please see this article about how to manually do security and crucial updates on ubuntu servers.

Here is how you can quickly turn off / disable automatic update for ubuntu servers.

Edit this apt configuration file:


Type this command to open nano editor and edit the file 20auto-upgrades:

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

Edit the content of 20auto-upgrades so that the following two lines contains the value of "0"

APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";

You don't need to restart server. This new apt configuration setting will be used the next time apt try to do routine update or upgrade.

Post a Comment

Mới hơn Cũ hơn