Frequently Asked Question

What is the difference between dpkg and rpm?

dpkg and rpm are the two main low-level package tools in the Linux world. They operate on a single package file at a time and know nothing about repositories or dependency resolution: hand dpkg -i foo.deb a package whose dependencies are missing and it will refuse to finish; hand rpm -i foo.rpm the same kind of file and it will do the same. Their job is to unpack, place files on disk, run maintainer scripts, and record what is installed in a local database.

The file formats are different, .deb is an ar archive containing two compressed tarballs (control metadata and payload), while .rpm is a custom binary format with a lead, signature, header, and payload, but they cover the same ground. dpkg stores its installed-package state in /var/lib/dpkg/, rpm in /var/lib/rpm/ as a Berkeley DB or sqlite database. Everyday users almost never invoke them directly; they go through apt or dnf, which call them as the final step.

Further reading and video