100% non-interactive Debian dist-upgrade

Solution 1:

If you set DEBIAN_FRONTEND=noninteractive (to stop debconf prompts from appearing) and add force-confold and force-confdef to your /etc/dpkg/dpkg.cfg file, you should have a completely noninteractive package installation experience. Any package that still prompts you for information has a release critical bug (and I say that as both an automation junkie and as a Debian developer).

Solution 2:

Florian Lohoff posted a way to get what womble suggested into a single command:

DEBIAN_FRONTEND=noninteractive \
apt-get \
-o Dpkg::Options::="--force-confnew" \
--force-yes \
-fuy \
dist-upgrade

Of course you might also use -o Dpkg::Options::="--force-confnew --force-confdef" (search the the dpkg man page for confnew). I'm not sure in what cases this would make a difference though. I personally need the non-interactive upgrade to bring vanilla images up-to-date, in which case I suppose always picking the new config file (without --force-confdef) is a reasonable thing.