Ubuntu: Disable Automatic Updates via Console

Automatic Updates are done by a scheduled job (via /etc/cron.daily/apt) to automatically update the package list, upgrade packages, etc. and notifications to the user about available updates.

Some ‘sensitive’ machines need to be updated manually, to have full control of the packages that will be affected during the process.
Disable the Automatic Update configured in Ubuntu is immediate.

Edit the file:

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

Change all values (matching the pattern “APT::Periodic::*”) to “0”:

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

Note: The naming of auto-upgrade script located in /etc/apt/apt.conf.d/ could be subjected to variations, usually the number indicating the read priority is the variable part and the file name will contain the “auto-upgrades” suffix.


Comments are closed.