Feature request: Reset configuration
Hi,
I recently read this workaround:
If the dpkg-reconfigure foo doesn't work, use this:
1. Remove or rename the broken configuration file.
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.broken
2. Request replacements from dpkg.
sudo dpkg -i --force-confmiss /path/to/samba-common.deb
This tells dpkg to replace missing configuration files with those from
the .deb. You might find the original package .deb in
/var/cache/apt/archives, or you can use a fresh copy of the same version
from your distribution's repositories.
dpkg -i --force-confnew foo.deb
That flag only forces dpkg to overwrite the config file if it would
otherwise have asked for permission to do so. It does not make it
magically recreate pristine config files from the package.
from superuser: How do I get the default configuration from a .deb file?
<http://superuser.com/questions/69045/how-do-i-get-the-default-configuration-from-a-deb-file>
(quack quixote♦ and Teddy) and serverfault: Linux: how to restore config
file using apt-get/aptitude?
<http://serverfault.com/questions/82801/linux-how-to-restore-config-file-using-apt-get-aptitude>
(TRS-80)
--
This is the workaround needed to reset the configuration of some debian
packages who need them. There are also other workarounds (e.g. purge
first and ignore dependencies and then install again; e.g. Extract
configuration files from .deb manually), but they are ugly and
workarounds as well. Or have I overlooked something?
It seems to be an important feature and I propose you to implement this
option to magically make the configuration of an package pristine. Come
on, everybody will be happy about such feature.
Regards,
Daniel Bock
Reply to: