Friday, April 10, 2020

Disable Upgrade on Ubuntu




There is a system upgrade feature that runs an annoying amount on Ubuntu, unattended-upgrades.

It is running an extended scan to create pre-staged install goods for doing upgrades.  If you allow them to take place that's good.  If you do version management yourself it's a waste.

If you have lightweight virtual servers running several OS's it eats the processor for an extended time every 7 hours by default (according to my logs).

Here's how to turn it off

How to Enable/Disable Unattended Upgrades in Ubuntu 16.04

https://linoxide.com/ubuntu-how-to/enable-disable-unattended-upgrades-ubuntu-16-04/

Block packages from automatic updating

You can blacklist few packages from being automatically updated by adding them in the blacklist section like below. Anything that comes under this list will not be updated automatically. In the following configuration, the packages vim, libc6, libc6-dev, libc6-i686 will not be automatically updated.
Unattended-Upgrade::Package-Blacklist {
 "vim";
 "libc6";
 "libc6-dev";
 "libc6-i686";
};
At last, edit the file /etc/apt/apt.conf.d/10periodic to configure when update, upgrade and auto-clean should run.
# vi /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";

The above configuration lets unattended upgrades update the package list, downloads and installs available upgrades every day and the local download archive is cleaned every week. If you want to disable automatic updates, just change the value 1 to 0. Check the log of unattended-upgrades inside the folder /var/log/unattended-upgrades. You can disable the automatic updates by making the value of the parameter APT::Periodic::Update-Package-Lists to "0".

*******************

Another post on disabling upgrades using dpkg option modification.

 

https://ostechnix.com/how-to-disable-unattended-upgrades-on-ubuntu/

 
--30--

No comments:

Post a Comment