How to list files belonging to a package in Debian


What is the quickest way to list all files that belong to an installed package on a Debian system?


You can list all files that belong to a package in a Debian system by using the dpkg -L command along with the installed package name, e.g.:

dpkg -L apache2.2-bin

Will give you a list of the installed files belonging to that package

dpkg command also works in Ubuntu Linux and other Debian derivatives.

Our recommendation however is to use the wajig software to manage your packages in Debian. wajig provides you with all the package management tools you need in a single convenient script, so that you don't have to remember if the command you're looking for is either in dpkg, apt-get or apt-cache.

To install wajig type:

sudo apt-get install wajig

Then run this command to retrieve the full list of files belonging to a package:

wajig listfiles yourpackage-name