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?
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.
sudo apt-get remove --purge <packagename>
– John Orion Dec 13 '17 at 02:13