0

Say I install a package like postgresql, and then I change the config file.

I now want to see what the default config file was, is it possible to use apt to re-install over what I changed or see the diff?

Blankman
  • 8,275
  • not sure it will copy the original config file .. best bet would be save a copy of your config somewhere ..then uninstall purge the app and install it again ... purge should delete the information including the config files so the install after a purge should be a 'clean' install. sudo apt-get remove --purge <packagename> – John Orion Dec 13 '17 at 02:13

1 Answers1

1

You can reinstall a package using apt by running sudo apt install --reinstall package-name. For example sudo apt install --reinstall postgresql

As for seeing what the diff is, the best option would probably be to save a copy of the config file as soon as you install the package, and then compare the modified version again that one.

  • need an added l in install .. saw the one update but you missed that one :D – John Orion Dec 13 '17 at 02:17
  • I think your way will work too .. maybe during the reinstall it will say that the config has changed and give the option of keeping the modified one or using the manufacturers one .. may even give a chance to compare them – John Orion Dec 13 '17 at 02:21