Search code examples
dpkg

Run dpkg --configure -a in silent mode


For reasons outside the scope of this question, I need to execute

sudo dpkg-reconfigure libc6
sudo dpkg --configure libssl1.1

during the provisioning of a VM with Vagrant. While that works, the --configure part open sort of a GUI asking for a Yes to restart services. That requires manual intervention. I there a way to do this silently from the provision.sh shellscript? Something like dpkg --configure --yes or dpkg --configure --silent or alike? Thanks


Solution

  • According to the dpkg manual you could use --force-all, though I strongly recommend reading through the --force section and making a manual list of things you want to force.