← 返回命令列表

Linux command

dpkg-deb 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Example

dpkg-deb -I [path/to/file.deb]

Example

dpkg-deb -W [path/to/file.deb]

List

dpkg-deb -c [path/to/file.deb]

Extract

dpkg-deb -x [path/to/file.deb] [path/to/directory]

Extract

dpkg-deb --raw-extract [path/to/file.deb] [path/to/directory]

Build

dpkg-deb -b [path/to/directory]

Show a specific control file

dpkg-deb -f [path/to/file.deb] [field_name]

说明

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.

参数

-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 _archive_ _dir_
Extract and list files
-e, --control _archive_ _dir_
Extract control information files
-R, --raw-extract _archive_ _dir_
Extract everything (data and control info)
-f, --field _archive_ _field_
Show control file field values
-b, --build _dir_ _archive_
Build package from directory

FAQ

What is the dpkg-deb command used for?

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.

How do I run a basic dpkg-deb example?

Run `dpkg-deb -I [path/to/file.deb]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -I, --info _archive_ do in dpkg-deb?

Show package information