Revert Debian package configuration

5 octobre 2017 par: Benoit Bonneville

If one day you remove your package configuration

Example of stupid command

rm -rf /etc/apache2/

It’s time to

Revert Apt package configuration

apt-get -o DPkg::options::=–force-confmiss –reinstall install [package name]

This command install only non existing configuration files.

If you have modified your configuration file, and want to get back to the package version, you need to remove your whole directory :

mv /etc/apache2 /etc/apache2_broken

Then run the –reinstall command, and your configuration files will be back in your /etc/apache2 directory.

This method works on Debian Based Unix, Ubuntu, Mint …

Filed under: Non classé