0

If I want to reinstall the configs of some package x (i.e. files in /etc), how would I do that?

Does apt-get --reinstall install x always reinstalls the configs?

Other answers suggest to remove the configs first and then use apt-get -o Dpkg::Options::="--force-confmiss" x. However, I don't want to do that for all of /etc because I want to keep my system in a well-behaved state as far as possible. I basically just want that it overwrites existing config files.

I also read about --force-all, --force-confnew, --overwrite-conffiles and the UCF_FORCE_CONFFMISS, UCF_FORCE_CONFFNEW env vars. Some documentation is here and here, although I'm not sure if it does exactly what I want.

Albert
  • 2,817

1 Answers1

1

This is what you want to do:

sudo -s
cd /tmp
mkdir deb
cd deb
apt-get update
apt-get download package1 package2 package3
dpkg -i --force-confmiss *.deb

You can look here for some more ways.

davidbaumann
  • 1,915