GNU/Linux Desktop Survival Guide by Graham Williams |
|||||
The dpkg and apt-get commands are pretty useful and provide a lot of functionality. Here's some common things that you may want to do:
Search for the package that installed the file diff.info.gz
$ dpkg --search diff.info.gz [alternative is -S] |
List all packages installed (one line per package)
$ dpkg --list [alternative is -l] $ dpkg --get-selections |
What is the (one-line) status of the diff package?
$ dpkg --list diff |
List the information for any package with diff in its name
$ dpkg --list *diff* |
List files associated with the package diff
$ dpkg --listfiles diff [alternative dpkg -L diff] |
What packages mention diff?
$ apt-cache search diff |
Display information about a package
$ apt-cache show diff [alternative is dpkg --print-avail] |
What packages depend on diff?
$ apt-cache showpkg diff $ apt-cache depends diff |