Linux "dpkg-deb" Command Line Options and Examples
Debian package archive

dpkg-deb packs, unpacks and provides information about Debian archives. Use dpkg to install and remove packages from your system. You can also invoke dpkg-deb by calling dpkg with whatever options you want to pass to dpkg-deb.


Usage:

dpkg-deb [option...] command






Command Line Options:

--showformat
This option is used to specify the format of the output --show will produce. The format is a string that will be output foreach package listed.The string may reference any status field using the “${field-name}” form, a list of the valid fields can be easily producedusing -I on the same package. A complete explanation of the formatting options (including escape sequences and field tabbing)can be found in the explanation of the --showformat option in dpkg-query(1).The default for this field is “${Package}\t${Version}\n”.
dpkg-deb --showformat ...
-zcompress-level
Specify which compression level to use on the compressor backend, when building a package (default is 9 for gzip, 6 for xz and19 for zstd). The accepted values are 0-9 with: 0 being mapped to compressor none for gzip. Before dpkg 1.16.2 level 0 wasequivalent to compressor none for all compressors.
dpkg-deb -zcompress-level ...
-Scompress-strategy
Specify which compression strategy to use on the compressor backend, when building a package (since dpkg 1.16.2). Allowedvalues are none (since dpkg 1.16.4), filtered, huffman, rle and fixed for gzip (since dpkg 1.17.0) and extreme for xz.
dpkg-deb -Scompress-strategy ...
-Zcompress-type
Specify which compression type to use when building a package. Allowed values are gzip, xz (since dpkg 1.15.6), and none(default is xz).
dpkg-deb -Zcompress-type ...
--[no-]uniform-compression
Specify that the same compression parameters should be used for all archive members (i.e. control.tar and data.tar; since dpkg1.17.6). Otherwise only the data.tar member will use those parameters. The only supported compression types allowed to beuniformly used are none, gzip and xz. The --no-uniform-compression option disables uniform compression (since dpkg 1.19.0).Uniform compression is the default (since dpkg 1.19.0).
dpkg-deb --[no-]uniform-compression ...
--root-owner-group
Set the owner and group for each entry in the filesystem tree data to root with id 0 (since dpkg 1.19.0).Note: This option can be useful for rootless builds (see rootless-builds.txt), but should not be used when the entries have anowner or group that is not root. Support for these will be added later in the form of a meta manifest.
dpkg-deb --root-owner-group ...
--deb-format
Set the archive format version used when building (since dpkg 1.17.0). Allowed values are 2.0 for the new format, and0.939000 for the old one (default is 2.0).The old archive format is less easily parsed by non-Debian tools and is now obsolete; its only use is when building packagesto be parsed by versions of dpkg older than 0.93.76 (September 1995), which was released as i386 a.out only.
dpkg-deb --deb-format ...
--nocheck
Inhibits dpkg-deb --build's usual checks on the proposed contents of an archive. You can build any archive you want, no matterhow broken, this way.
dpkg-deb --nocheck ...
-v
Enables verbose output (since dpkg 1.16.1). This currently only affects --extract making it behave like --vextract.
dpkg-deb -v ...
-D
Enables debugging output. This is not very interesting.EXIT STATUS0 The requested action was successfully performed.2 Fatal or unrecoverable error due to invalid command-line usage, or interactions with the system, such as accesses to thedatabase, memory allocations, etc.ENVIRONMENTTMPDIR If set, dpkg-deb will use it as the directory in which to create temporary files and directories.SOURCE_DATE_EPOCHIf set, it will be used as the timestamp (as seconds since the epoch) in the deb(5)'s ar(5) container and used to clamp themtime in the tar(5) file entries.NOTESDo not attempt to use just dpkg-deb to install software! You must use dpkg proper to ensure that all the files are correctly placedand the package's scripts run and its status and contents recorded.BUGSdpkg-deb -I package1.deb package2.deb does the wrong thing.There is no authentication on .deb files; in fact, there isn't even a straightforward checksum. (Higher level tools like APT supportauthenticating .deb packages retrieved from a given repository, and most packages nowadays provide an md5sum control file generatedby debian/rules. Though this is not directly supported by the lower level tools.)
dpkg-deb -D ...