Super User is a question and answer site for computer enthusiasts and power users. 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'm an Ubuntu user and I install packages with the apt-get. For example:

sudo apt-get install hadoop-0.20

After I install the package, there will be files in /usr/bin, /usr/lib/hadoop etc. Are there any commands can show out where exactly the package installed its files?

share|improve this question

migrated from Jul 28 '12 at 21:05

This question came from our site for professional and enthusiast programmers.

Try the man pages of the apt command family. For example: man apt-get – arkascha Jul 27 '12 at 8:16
up vote 5 down vote accepted

Yes, use the dpkg command like

  dpkg -L hadoop-0.20

The converse question (finding the package providing a given file) is answered with e.g.

  dpkg -S /usr/include/gc/gc.h

Read more about Debian packaging related tools

PS. Ubuntu (and other Linux distributions, eg Mint) is a derivative of Debian.

share|improve this answer
dpkg will not tell you about config files and/or files created by the postinst script if the package. If you need to be really sure you get all files if a package, you will also need to examine its packaging scripts. – tripleee Jul 27 '12 at 11:43

You can list the installed files for a package by passing the --listfile flag to dpkg. For example, if your package is actually named "hadoop-0.20" then:

dpkg --listfiles hadoop-0.20
share|improve this answer
Or in a shorter form dpkg -L as I already answered. – Basile Starynkevitch Jul 27 '12 at 8:48

What files are installed on your system varies from package to package. To be 100% sure you should take a look into the .deb package yourself. Download the package first.

First you need to extract the .deb archive:

ar vx mypackage.deb

Now this should result in three new files: debian-binary, control.tar.gz and data.tar.gz. You're interested in the last one.

Now you can extract it as well using tar:

tar xzvf data.tar.gz

Now you can browse the package content freely. Look for any makefiles, install scripts and such like to see where things gets installed.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .