dpkg

dpkg is the core program that installs, builds, removes, and manages software packages on Debian and Debian-derived Linux systems. Its own manual page describes it plainly: “dpkg is a medium-level tool to install, build, remove and manage Debian packages” (https://manpages.debian.org/bookworm/dpkg/dpkg.1.en.html). The packages it handles are the .deb archive files that carry compiled software together with metadata about the package’s name, version, and dependencies.

dpkg sits at the bottom of Debian’s packaging stack. The Debian FAQ describes the layering: “The higher level package management tools such as aptitude or synaptic rely on apt which, itself, relies on dpkg to manage the packages in the system” (https://www.debian.org/doc/manuals/debian-faq/pkgtools.en.html). In other words, dpkg does the actual work of unpacking and configuring a package, while the tools above it decide which packages are needed and where to get them.

That division of labor also marks dpkg’s limits. dpkg works directly with .deb files on disk; it does not fetch packages from the network or work out a full chain of dependencies on its own. The FAQ notes that “apt-get does not understand .deb files, it works with the packages proper name and can only install .deb archives from a source specified in /etc/apt/sources.list” (https://www.debian.org/doc/manuals/debian-faq/pkgtools.en.html), which is the complementary role apt plays above dpkg.

As one of the earliest real operating-system package managers, dpkg helped establish the now-familiar idea that software on a Unix-like system should be installed, tracked, and removed as discrete, versioned units rather than as loose files copied into place by hand.