LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dpkg

low-level Debian package manager

TLDR

Install a package file
$ sudo dpkg --install [path/to/package.deb]
copy
Unpack without configuring it yet
$ sudo dpkg --unpack [path/to/package.deb]
copy
Configure a package that is unpacked but not set up
$ sudo dpkg --configure [package]
copy
Configure everything left half-installed
$ sudo dpkg --configure -a
copy
Remove a package, keeping its configuration
$ sudo dpkg --remove [package]
copy
Remove a package and its configuration
$ sudo dpkg --purge [package]
copy
List installed packages matching a pattern
$ dpkg --list '[*ssh*]'
copy
Show one package's status
$ dpkg --status [package]
copy
List the files a package installed
$ dpkg --listfiles [package]
copy
Find which package owns a file
$ dpkg --search [/usr/bin/ssh]
copy
List what is inside a .deb without installing it
$ dpkg --contents [path/to/package.deb]
copy
Extract a .deb into a directory
$ dpkg --extract [path/to/package.deb] [path/to/dir]
copy
Verify installed files against their recorded checksums
$ dpkg --verify [package]
copy
Report packages that are broken or half-installed
$ dpkg --audit
copy

SYNOPSIS

dpkg [options] action [package|file]

DESCRIPTION

dpkg is the low-level package manager for Debian-based systems. It handles the installation, removal, and management of .deb packages. Higher-level tools like apt and apt-get use dpkg internally.

PARAMETERS

-i, --install file.deb

Install a package from a .deb file
-r, --remove package
Remove a package (keep configuration files)
-P, --purge package
Remove a package and its configuration files
-l, --list pattern
List packages matching pattern
-L, --listfiles package
List files installed by a package
-c, --contents file.deb
List contents of a .deb file
-S, --search path
Search for a package owning a file
-s, --status package
Display package status details
--configure package
Configure an unpacked package
--unpack file.deb
Unpack but don't configure a package
--get-selections [pattern]
Get list of package selections
--set-selections
Set package selections from stdin
--audit, -C
Search for partially installed packages and suggest how to fix them.
--force-things
Override safety checks (e.g. --force-all, --force-overwrite). Use with care.
--no-act, --dry-run, --simulate
Show what would be done without making changes.

INSTALL

sudo apt install dpkg
copy
sudo dnf install dpkg
copy
sudo pacman -S dpkg
copy
sudo apk add dpkg
copy
sudo zypper install dpkg
copy
brew install dpkg
copy
nix profile install nixpkgs#dpkg
copy

CAVEATS

dpkg does not handle dependencies automatically. Use apt or apt-get for dependency resolution. Configuration files are kept by default when removing packages.

HISTORY

dpkg was originally created for the Debian project in 1994 by Ian Murdock, then rewritten in C by Ian Jackson who became its primary developer. It remains the foundation of package management on Debian-based systems.

SEE ALSO

apt(8), apt-get(8), dpkg-deb(1), dpkg-query(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid