apt-get -o DPkg::options::=--force-confmiss --reinstall install <package>
Update: apt-get only reinstalls missing config files. You can use dpkg --purge <package>
to remove the config files before reinstalling the package.
apt-get -o DPkg::options::=--force-confmiss --reinstall install <package>
Update: apt-get only reinstalls missing config files. You can use dpkg --purge <package>
to remove the config files before reinstalling the package.
Great ! I saved many times !
great. but even so, apt-get seems to only install the missing config files
Thanks, I updated the “post”. You can still use
dpkg --purge <package>
to remove config files from a package, before reinstalling the package with--force-confmiss
.apt-get -o DPkg::options::=–force-confmiss –reinstall install pulseaudio
not work for me.
/etc/pulse/default.pa still have my changes.
Ubuntu 12.10
Try yourself.
Hello,
/etc/pulse/default.pa still have my changes.
Did you try uninstalling completely pulseaudio and all its files?
dpkg --purge pulseaudio
Is the file /etc/pulse/default.pa owned by the pulseaudio package?
I don’t have an Ubuntu system atm to try this on, sorry.
Hi,
have you got a way to reinstall config files from packages can’t be purged(e.g. base-files)?
Sorry, I don’t know how to do that automatically.
Maybe download the deb file and extract the configuration files manually?
Is it possible to just delete config file and reinstall package using above command?
It appears some of the other solutions won’t work if the configuration files of the package are managed with ucf.
In this case you can use :
UCF_FORCE_CONFFMISS=1 apt-get –reinstall install [pkgname]
Hey thanks,
Trying to reinstall bacula-server. I am not getting the configuration files. Everything from your page does not work. I will continue to seek a solution and will get back with you if/when I find the solution.
Thanks again,
Mike
# apt-get purge bacula-server
# apt-get install aptitude
# cd /var/cache/apt/archives/
# ls
…find your .deb
# aptitude install -o Dpkg::Options::=–force-confmiss bacula-server_5.2.6+dfsg-9.1ubuntu3_all.deb
# apt-get install bacula-server
Whamo all config files are back! Royal pain. Next time I will make a .bak file before I start mad configs!
regards,
Mike
UCF_FORCE_CONFFMISS=1 apt-get –reinstall install [pkgname]
don’t work on Debian 9.
apt-get -o DPkg::options::=–force-confmiss –reinstall install
OK