How do you get a list of files that have been installed from a dpkg package?

How do you get a list of files that have been installed from a dpkg package?

How do you get a list of files that have been installed from a dpkg package?

A.
dpkg -l pkgname

B.
dpkg -C pkgname

C.
dpkg -s pkgname

D.
dpkg -S pkgname

E.
dpkg -L pkgname

Explanation/Reference:
-l prints the list of all packages matching pkgname
-C checks for broken packages
-s displays status information for a package
-S searches for a package matching pkgname



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Tom Liddle

Tom Liddle

uncapitalize the L

nwildner

nwildner

No. This answer is correct. -L (capital) will list the contents of a package, and dpkg -l will list all packages installed with their status and a brief description of the packages.

dpkg -L package is correct. Example:

nwildner@workstation:~# dpkg -L bash
/.
/etc
/etc/bash.bashrc
/etc/skel
/etc/skel/.profile
/etc/skel/.bash_logout
/etc/skel/.bashrc
/bin
/bin/bash
/usr
/usr/share
/usr/share/doc
/usr/share/doc/bash
/usr/share/doc/bash/inputrc.arrows
/usr/share/doc/bash/POSIX.gz
/usr/share/doc/bash/changelog.Debian.gz
/usr/share/doc/bash/README.abs-guide
/usr/share/doc/bash/RBASH
/usr/share/doc/bash/INTRO.gz
/usr/share/doc/bash/COMPAT.gz
/usr/share/doc/bash/NEWS.gz
/usr/share/doc/bash/README
/usr/share/doc/bash/copyright
/usr/share/doc/bash/README.Debian.gz
/usr/share/doc/bash/README.commands.gz
/usr/share/man
/usr/share/man/man7
/usr/share/man/man7/bash-builtins.7.gz
/usr/share/man/man1
/usr/share/man/man1/bashbug.1.gz
/usr/share/man/man1/rbash.1.gz
/usr/share/man/man1/clear_console.1.gz
/usr/share/man/man1/bash.1.gz
/usr/share/menu
/usr/share/menu/bash
/usr/share/info
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/bash
/usr/bin
/usr/bin/bashbug
/usr/bin/clear_console
/bin/rbash