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.
find -exec
to automate @gertvdijk 's solution. – muru Dec 22 '14 at 10:10/etc
). I want them to be replaced directly. Would--force-confnew
and--overwrite-conffiles
do what I want? – Albert Dec 22 '14 at 10:52