How can I avoid the dialog when I run dpkg-reconfigure unattended-upgrades
? I want to select Yes automatically.
2 Answers
That’s a low-priority question, so you can skip it by specifying medium or higher:
dpkg-reconfigure -pmedium unattended-upgrades
The default answer is the current value of APT::Periodic::Unattended-Upgrade
in /etc/apt/apt.conf.d/20auto-upgrades
, and if that isn’t set, “Yes”.
sudo EDITOR='sed -Ei "
s|unattended-upgrades/enable_auto_updates=.+|unattended-upgrades/enable_auto_updates=\"no\"|
"' dpkg-reconfigure -f editor unattended-upgrades
Related answer: How do you set a locale non-interactively on Debian/Ubuntu?