To enable unattended-upgrades
for packages which can show dpkg
config change menu, one has to configure apt
and dpkg
with these config options:
Dpkg::Options {
"--force-confdef";
"--force-confold";
};
These options should be added to a config fragment under /etc/apt/apt.conf.d
; however, this will cause any apt-get upgrade
command to not ask for config change selection.
My question is: does a method exist to enable --force-confdef --force-confold
only for unattended-upgrades
, short of modifying the systemctl apt-daily-upgrade.service
unit file (ie: by adding a custom APT_CONFIG
env var)? In other words, does exist a specific config file which is valid for unattended-upgrades
only?
Note: I am using Ubuntu 20.04, but I expect this question to be relavant for Debian also.