Regarding configuration of Unattended-Upgrades:
Which are the appropriate files for configuring each option of Unattended-Upgrades?
I have seen three files mentioned, see below. I am not certain others could also be used.Can any of the files above be used for any of the options, or there is a restriction on this? (There is some overlap, for sure, see below).
Which has precedence for repeated options?
PS: These are actually different questions, but intimately related, so it would be possibly less convenient to separate them into different posts.
What I see in my 18.04LTS:
$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
$ cat /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
$ cat /etc/apt/apt.conf.d/50unattended-upgrades
(long output)
PS2: As for how to configure or disable, these are related
Limiting the time Unattended-Upgrade keeps the lock on `/var/lib/dpkg/`
Ubuntu 16.04: Unattended-upgrades runs at random times
Unattended-upgrades running for hours
Disable automatic updates ubuntu 18.04
disable updates from command line in Ubuntu 16.04
Disable Software Updater Notification?
How to Enable/Disable Unattended Upgrades in Ubuntu 16.04
Terminate and disable/remove unattended upgrade before command returns
As for the precedence of the configurations files, see this question
/etc/apt/apt.conf.d/10periodic is related to update-notifier-common package. Same setting variables that are set in /etc/apt/apt.conf.d/20auto-upgrades will override those settings. You can setup the
20auto-upgrades
file by runningsudo dpkg-reconfigure unattended-upgrades
. If you use the GUI way i.e. "Software & Updates" dialog i.e./usr/bin/software-properties-gtk
(its Updates tab), it will change both files. As for scheduling unattended-upgrades, I suppose it goes the same way as with Debian; see this question.You should not modify /etc/apt/apt.conf.d/50unattended-upgrades. Instead, use files starting with e.g. "51" to override some of the settings:
Reference: https://github.com/mvo5/unattended-upgrades/blob/master/README.md