Listing the Packages that are Available for Your System
$ dpkg -l ‘*emacs*’
Listing the Packages that are Available and uninstalled
$ dpkg -l ‘*emacs*’ | grep ‘^un’
List contents of a package
$ dpkg -L emacs21
Determining What Package Provides an Existing File
$ dpkg --search /usr/bin/ar # which package provides the /usr/bin/ar archiving
utility:
Determining What Package Provides a Missing File
$ ls -l /usr/lib/*power*
-> ls: /usr/lib/*power*: No such file or directory
$ apt-file search libpowersave.so
->libpowersave-dev: usr/lib/libpowersave.so