I have been trying to suppress an interactive dialog with regards to modified config files and conflicts. I have been all over the search results, and everyone keeps copy and pasting the same exact answer without providing additional context.
I have landed at the solution to put a config file in /etc/apt/apt.conf.d
that contains the well-copy-pasted item:
Dpkg::Options {
"--force-confdef";
"--force-confold";
}
I have included APT::Get::Assume-Yes "true";
and this is absolutely working. I have confirmed with apt-config
that the Dpkg::Options
are being loaded. But every time I try DEBIAN_FRONTEND=noninteractive sudo apt upgrade
with this config, the interactive dialog stops my automated script.
Could someone provide more than copypasta as to why this config is failing? Why would these settings be ignored?
To reproduce my plight:
- Create a new Ubuntu 20.04 instance on Lightsail
- Add
/etc/apt/apt.conf.d/99confold
containing the settings above - Modify
/etc/cloud/cloud.cfg
in some way sudo apt update
thensudo apt upgrade
The conflict dialog still appears towards the end of the updates.