4

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.

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • How did you come up with the *premise*? I have used unattended-upgrades and manual upgrades alternately on Ubuntu just fine with only the latter running interactively and thus asking for conf choices. – anx Dec 25 '20 at 23:31
  • 3
    @anx https://github.com/mvo5/unattended-upgrades/blob/debian/buster/README.md#supported-options-reference "Example - force dpkg to keep the old configuration files:" followed by "Note that unattended-upgrades detects this option, and ensures that packages with configuration prompts will never be held back." – A.B Dec 25 '20 at 23:40
  • @A.B Oh wow, the detection looks fairly solid actually. I never knew what it was supposed to do.. because it never skipped over packages with changed config for me. Now I wonder why.. – anx Dec 26 '20 at 00:23

0 Answers0