1

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?

3 Answers 3

1

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

1

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

2
  • 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, 2011 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, 2011 at 16:01
0

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.

You must log in to answer this question.

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