Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

3 Answers

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

share|improve this answer
add comment

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
add comment

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;
done

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
add comment

Your Answer

 
discard

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.