In this small tip, we will see how to disable automatic updates in ubuntu.
Make sure you use sudo or you are connected as root to be able to edit the config files.
With your favorite text editor open this file:
/etc/apt/apt.conf.d/10periodic
and:
/etc/apt/apt.conf.d/20auto-upgrades
Change “Periodic Update Package Lists” and “Unattended-Upgrade” depending on whether you want to disable or enable automatic updates.
Disable
To deactivate automatic updates make sure this value is “0” inside /etc/apt/apt.conf.d/10periodic.
APT::Periodic::Update-Package-Lists "0";
Edit /etc/apt/apt.conf.d/20auto-upgrades and change this value to “0”.
APT::Periodic::Unattended-Upgrade "0";
Enable
If you want to activate automatic updates, make sure you set the value to “1”.
APT::Periodic::Update-Package-Lists "1";
And change Unattended-Upgrade to “1” as well.
APT::Periodic::Unattended-Upgrade "1";