How to list files of a Debian package without install
dpkg -c
(or --contents
) lists the contents of a .deb package file (It is a front-end to dpkg-deb
.)
dpkg -c package_file.deb
To work directly with package names rather than package files, you can use apt-file
. (You may need to install the apt-file
package first.)
sudo apt-file update
apt-file list package_name
As stated in the first comment, apt-file lists contents for packages in your already-configured Apt repositories. It is irrelevant whether any particular package is or is not installed.
Use --contents
instead of -L
:
dpkg --contents PACKAGENAME
When used in this manner, dpkg
acts as a front-end to dpkg-deb
, so use man dpkg-deb
to see all the options.
You can also use an archive browser to view the package contents.
dpkg --contents
will let you look at the uninstalled package. If the .deb is not on your system yet, do
apt-get --download-only install pkgname
The package will get downloaded to /var/cache/apt/archives
but not installed.