1. Home
  2. Computing & Technology
  3. Focus on Linux

Ubuntu

Documentation

By Juergen Haas, About.com

Apt/Dpkg

Beyond the basic use of installing programs, apt and dpkg have many features that are useful for packaging.

  • apt-cache dump - lists every package in the cache. This command is especially helpful in combination with a grep pipe such as apt-cache dump | grep foo to search for packages whose names or dependencies include "foo".

  • apt-cache policy - lists the repositories (main/restricted/universe/multiverse) in which a package exists.

  • apt-cache show - displays information about a binary package.

  • apt-cache showsrc - displays information about a source package.

  • apt-cache rdepends - shows reverse dependencies for a package (which packages require the queried one.

  • dpkg -S - lists the binary package to which a particular file belongs.

  • dpkg -l - lists currently installed packages. This is similar to apt-cache dump but for installed packages.

  • dpkg -c - lists the contents of a binary package. It is useful for ensuring that files are installed to the right places.

  • dpkg -f - shows the control file for a binary package. It is useful for ensuring that the dependencies are correct.

  • grep-dctrl - searches for specialized information in packages. It is a specific use of the grep package (but not installed by default).

* License

* Ubuntu Packaging Guide Index

Explore Focus on Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Focus on Linux
  4. Linux Distributions
  5. Popular Linux Distros
  6. Ubuntu
  7. Ubuntu Packaging Guide
  8. Ubuntu Packaging Guide - Apt/Dpkg

©2008 About.com, a part of The New York Times Company.

All rights reserved.