LinuxCommandLibrary

dpkg-deb

Debian archive manipulation tool

TLDR

Display package information

$ dpkg-deb -I [path/to/file.deb]
copy
Display package name and version
$ dpkg-deb -W [path/to/file.deb]
copy
List package contents
$ dpkg-deb -c [path/to/file.deb]
copy
Extract contents to directory
$ dpkg-deb -x [path/to/file.deb] [path/to/directory]
copy
Build package from directory
$ dpkg-deb -b [path/to/directory]
copy

SYNOPSIS

dpkg-deb action [options] archive|directory

DESCRIPTION

dpkg-deb packs, unpacks, and provides information about Debian archives (.deb files). It's the low-level tool for working directly with the .deb file format without involving the package database.
The tool allows you to inspect package contents and metadata before installation, extract files from packages without installing them, or build new .deb archives from properly structured directory trees. Unlike dpkg itself, dpkg-deb operates purely on archive files and doesn't modify the system's package database.
Common use cases include examining unfamiliar packages for security auditing, extracting specific files from packages, and building custom .deb packages as part of a development workflow.

PARAMETERS

-I, --info archive

Show package information
-W, --show archive
Show package name and version
-c, --contents archive
List archive contents
-x, --extract archive dir
Extract files to directory
-X, --vextract
Extract and list files
-b, --build dir
Build package from directory

CAVEATS

Lower-level than dpkg; use dpkg for installation. Building packages requires proper debian/ directory structure. Part of dpkg package.

SEE ALSO

dpkg(1), dpkg-query(1), ar(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community