What happens when unattended-upgrades installs a new version of a package which has a different config file then on my computer? Normally you get asked if you want to keep yours or overwrite it with the one in the package.
1 Answers
Packages which would result in configuration file prompts are held back by unattended-upgrades
:
It will not install packages that require dependencies that can't be fetched from allowed origins, and it will check for conffile prompts before the install and holds back any package that requires them.
(from its README.md
file).
So any upgrade which would require manual intervention won’t happen automatically; it will only happen the next time you run apt upgrade
or an equivalent.
This can be configured using the general apt
Dpkg::Options
setting (in a configuration snippet in a file under /etc/apt/apt.conf.d
); for example
Dpkg::Options {"--force-confold"};
will keep the existing version of any conflicting configuration file on upgrade (and unattended-upgrades
will process the upgrade if it is configured in this way). Note however that this option would apply to any dpkg
invocation by an apt
-based tool, which may not be appropriate.

- 1,507
apt
would read it, it’s a generalapt
configuration setting; since it’s notunattended-upgrades
-specific it won’t be appropriate in most setups. (I’ve updated my answer to clarify that.) – Stephen Kitt Nov 17 '21 at 15:31