Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 am running Ubuntu 12.10 and, if possible, I would like to get the list of configuration files available for a given package that is already installed.

I would prefer to do this using dpkg or apt if possible, but no problem if other tools such as aptitude or dselect are needed/recommended.

share|improve this question
up vote 7 down vote accepted

There's no need to use anything other than cat, if I understood your intention correctly:

cat /var/lib/dpkg/info/<package>.conffiles

should give you what you're after. For instance for package zsh:

% cat /var/lib/dpkg/info/zsh.conffiles

Regarding a case where there's no such file for a given package - it's up to the package maintainer to designate certain files as configuration. If this hasn't been done properly, you should file a bug where appropriate.

In such cases you have a couple of options.

  1. List files belonging to the package that are in /etc/:

    dpkg -L package | grep '/etc'

  2. Fetch and inspect the source package to find out how it was compiled (which should also show you where it expects its configuration files to be located).

    apt-get source package less package-x.y.z/debian/rules

  3. Look up the upstream project page to find documentation.

share|improve this answer
If a given package is not having such a file .conffiles under this path, does it mean it is no using configuration files? – Daniel Yuste Aroca Apr 16 '13 at 13:14
Not necessarily - it might be that there are indeed configuration files used by the package but the packager did not designate any files as part of the packaged application's configuration files. – Marcin Kaminski Apr 16 '13 at 14:00

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.