dpkg
Low-level Debian package manager for installing, removing, and inspecting .deb files.
Synopsis
dpkg [OPTION]... ACTION PACKAGE...
Examples
sudo dpkg -i package.deb
dpkg -l | grep nginx
dpkg -L nginx
dpkg -s curl
Common options
| Flag | Description |
|---|---|
| -i | Install a .deb package |
| -r | Remove package |
| -l | List installed packages |
| -s | Show package status |
| -L | List files installed by package |
| --configure | Configure unpacked package |
About dpkg
The `dpkg` command low-level Debian package manager for installing, removing, and inspecting .deb files. Package management commands install, update, and remove software on Linux distributions.
Each distribution family has its own package manager — apt for Debian/Ubuntu, yum/dnf for RHEL/Fedora, pacman for Arch, and so on. Understanding your distro's package manager is one of the first steps in Linux administration.
The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man dpkg`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Package Management Commands
Other commands in the Package Management category