Differences
This shows you the differences between two versions of the page.
tech:linux:apt_upgrades [2019/10/11 06:27] |
tech:linux:apt_upgrades [2020/06/21 06:27] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Automatic apt upgrades ====== | ||
+ | Recently noticed the following on my daily cron output: | ||
+ | <code> | ||
+ | /etc/cron.daily/apt: | ||
+ | Package 'mysql-common' has conffile prompt and needs to be upgraded manually | ||
+ | </code> | ||
+ | |||
+ | It turns out automatic upgrade of packages is turned on by default in Ubuntu LTS 12.04 Precise Pangolin!!! | ||
+ | |||
+ | So Any case, did the following to disable in file: /etc/apt/apt.conf.d/20auto-upgrades | ||
+ | |||
+ | Changed | ||
+ | <code> | ||
+ | APT::Periodic::Unattended-Upgrade "1"; | ||
+ | </code> | ||
+ | To | ||
+ | <code> | ||
+ | APT::Periodic::Unattended-Upgrade "0"; | ||
+ | </code> | ||
+ | |||
+ | ===== On Xenial ===== | ||
+ | Open ''/etc/apt/apt.conf.d/50unattended-upgrades'' and comment out all lines under block ''Unattended-Upgrade::Allowed-Origins'' | ||
+ | |||
+ | Uninstall ''unattended-upgrades'' | ||
+ | |||
+ | Also update ''/etc/systemd/system/network-online.target.wants/networking.service'', ''TimeoutStartSec'' from 5min to 1min | ||
+ | |||
+ | |||
+ | ===== Also (did this on Bionic) ===== | ||
+ | <code bash> | ||
+ | systemctl disable packagekit | ||
+ | </code> | ||
+ | |||
+ | ===== On Groovy ===== | ||
+ | Open ''/etc/apt/apt.conf.d/50unattended-upgrades'' and comment out all lines under block ''Unattended-Upgrade::Allowed-Origins'' | ||
+ | |||
+ | Uninstall ''unattended-upgrades'' | ||
+ | |||
+ | <code bash> | ||
+ | systemctl disable packagekit | ||
+ | </code> | ||
+ | |||
+ | Disable in file: /etc/apt/apt.conf.d/20auto-upgrades | ||
+ | |||
+ | Changed | ||
+ | <code> | ||
+ | APT::Periodic::Unattended-Upgrade "1"; | ||
+ | </code> | ||
+ | To | ||
+ | <code> | ||
+ | APT::Periodic::Unattended-Upgrade "0"; | ||
+ | </code> | ||
+ | |||
+ | <code bash> | ||
+ | cd /etc/cron.daily | ||
+ | chmod ugo-x apt-compat | ||
+ | chmod ugo-x update-notifier-common | ||
+ | </code> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Keywords: Ubuntu Initial Setup, apt-get, aptitude | ||