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

If I want to install the tomcat6 package for example, would it be possible to see a list of files/directories of what/where this package will save?

Also, can I see the actual debian package to learn from it?

share|improve this question

You can find the package information at (e.g. tomcat6), including file lists and download link.

share|improve this answer

First, download the package you're interested in:

apt-get download tomcat6

Then open the downloaded package with File Roller to inspect it's contents:

file-roller tomcat6*.deb

share|improve this answer
after downloading, you can use 'dpkg -c <pkg>.deb' to display the contents of the package without needing to extract it. I usually pipe to less to make it easier to navigate the contents, like this: dpgk -c mypkg.deb | less – kyleN Nov 18 '11 at 4:16
I prefer to use file roller because you can inspect the control files and maintainer scripts. Installing a package can do more than copy files :) – cscarney Nov 19 '11 at 16:01

If package is already installed:

You can see what files from <packagename> are installed to your system by typing:

dpkg-query -L <packagename>

Without installing package:

sudo apt-get clean
sudo apt-get install -d <packagename>

for file in /var/cache/apt/archives/*; do
dpkg-deb -c $file;

This clears your local apt cache, then downloads the package without installing it. Then it prints the contents of the package and yet-to-be-installed dependencies to the screen. You might prefer

dpkg-deb -c $file | tee -a <filename>

to write the package contents to a file.

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.