Disable Auto-update On Ubuntu 18


After updating the system, it can be seen that there are many services that are automatically turned off. Because the specific services from the source code for a particular kernel are stopped after updating the system. So it is necessary to turn off Auto-Update.

So those who want to disable or enable Auto-Update should follow the below commands.

sudo dpkg-reconfigure -plow unattended-upgrades


You can also open the following command below:

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


You can disable specify 0 automatic updates:

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


if you want in the future you can update manually:

sudo apt update
sudo apt upgrade


If you want automatic updates enabled and you receive all kinds of update notifications all the time, then follow the commands below.:

sudo nano /etc/apt/apt.conf.d/50unattended-upgrades


Specify the parameters:

Unattended-upgrade::Mail "test@technicalafnan.com";
//Unattended-upgrade::Mail::MailonlyOnError "true";


You can also prohibit package updates in this file.

Unattended-upgrade::Package-BlackList {
//      "Vim";
//      "Libc6";
//      "Libc6-dev";
//      "Libc6-i686";
};


If you have Auto-Update Enabled and check if it works follow the below command.:

sodo unattended-upgrades --dry-run --debug

Auto-Update logs are written in this file /var/log/unattended-upgrades/unattemded-upgrades.log


See also my articles:
How to Upgrade from Ubuntu 20.04 To 22.04 Using Command Terminal


Post a Comment

Previous Post Next Post

Contact Form