Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server running Ubuntu and a program which was installed with apt-get install and I'd like to see the unmodified config file (e.g. /etc/foo/foo.cfg) so that I can diff it against the current version to see what modifications were made. Is there an easy way to do this, perhaps with some sort of apt command?

share|improve this question
up vote 1 down vote accepted

As far as I know you can only achieve this if you still have the original .deb around, but most of the time a similar one should be enough.

I think this link answers this question more thoroughly than I could:

share|improve this answer

apt-get doesn't store the original version of the configuration file. You can redownload the original package.

As a preventative measure, install etckeeper Install etckeeper, which is a seamless way of having version control in /etc. Once you've installed the package, edit /etc/etckeeper/etckeeper.conf to select your favorite version control software (the default is Bazaar, you can use Darcs, Git or Mercury instead), then run etckeeper init. You won't have to interact with etckeeper again unless you want to. You can run etckeeper commit manually after you've made a change, but if you don't apt will automatically make a commit before and after each package installation run. Use the VCS's commands (log, diff, annotate, …) to look at change histories and revert to older versions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.