Debian – 100% Non-Interactive Dist-Upgrade

aptdebianlinux

Is there a way to do an apt-get dist-upgrade in Debian that not only automatically answers "yes" to all questions asked, but also uses reasonable defaults as answers to questions that are sophisticated enough to require various interactive dialog boxes to pop up? I'm thinking here of the keymap stuff that shows up when you upgrade libc6, and kernel image choices.

The goal is to be able to remotely initiate a rather large dist-upgrade – even for a machine that is severely behind the times – and not have to babysit it at all, unless something is just horribly, disastrously wrong.

Surely this is possible?

Thanks in advance!

Best Answer

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).