dpkg is the software at the base of the Debian package management system.
dpkg is used to install, remove, and provide information about .deb packages.
dpkg itself is a low level tool; higher level tools, such as APT, are used to fetch packages from remote locations or deal with complex package relations. Tools like aptitude or synaptic are more commonly used than
dpkg on its own, as they have a more sophisticated way of dealing with package relationships and a friendlier interface.
What package is that file in?
One question I get all the time is “What package is that file in?” There’s a really easy way to find out yourself. It’s called apt-file and it can search for a file in any package (installed or not). It’s really easy to use:
$ sudo apt-get install apt-file
$ sudo apt-file update
$ apt-file search autoexpect