1dpkg-deb(1)                       dpkg suite                       dpkg-deb(1)
2
3
4

NAME

6       dpkg-deb - Debian package archive (.deb) manipulation tool
7

SYNOPSIS

9       dpkg-deb [option...] command
10

DESCRIPTION

12       dpkg-deb packs, unpacks and provides information about Debian archives.
13
14       Use dpkg to install and remove packages from your system.
15
16       You can also invoke dpkg-deb by calling dpkg with whatever options you
17       want to pass to dpkg-deb. dpkg will spot that you wanted dpkg-deb and
18       run it for you.
19
20       For most commands taking an input archive argument, the archive can be
21       read from standard input if the archive name is given as a single minus
22       character («-»); otherwise lack of support will be documented in their
23       respective command description.
24

COMMANDS

26       -b, --build binary-directory [archive|directory]
27           Creates a debian archive from the filesystem tree stored in binary-
28           directory. binary-directory must have a DEBIAN subdirectory, which
29           contains the control information files such as the control file
30           itself. This directory will not appear in the binary package's
31           filesystem archive, but instead the files in it will be put in the
32           binary package's control information area.
33
34           Unless you specify --nocheck, dpkg-deb will read DEBIAN/control and
35           parse it. It will check the file for syntax errors and other
36           problems, and display the name of the binary package being built.
37           dpkg-deb will also check the permissions of the maintainer scripts
38           and other files found in the DEBIAN control information directory.
39
40           If no archive is specified then dpkg-deb will write the package
41           into the file binary-directory.deb.
42
43           If the archive to be created already exists it will be overwritten.
44
45           If the second argument is a directory then dpkg-deb will write to
46           the file directory/package_version_arch.deb.  When a target
47           directory is specified, rather than a file, the --nocheck option
48           may not be used (since dpkg-deb needs to read and parse the package
49           control file to determine which filename to use).
50
51       -I, --info archive [control-file-name...]
52           Provides information about a binary package archive.
53
54           If no control-file-names are specified then it will print a summary
55           of the contents of the package as well as its control file.
56
57           If any control-file-names are specified then dpkg-deb will print
58           them in the order they were specified; if any of the components
59           weren't present it will print an error message to stderr about each
60           one and exit with status 2.
61
62       -W, --show archive
63           Provides information about a binary package archive in the format
64           specified by the --showformat argument. The default format displays
65           the package's name and version on one line, separated by a
66           tabulator.
67
68       -f, --field archive [control-field-name...]
69           Extracts control file information from a binary package archive.
70
71           If no control-field-names are specified then it will print the
72           whole control file.
73
74           If any are specified then dpkg-deb will print their contents, in
75           the order in which they appear in the control file. If more than
76           one control-field-name is specified then dpkg-deb will precede each
77           with its field name (and a colon and space).
78
79           No errors are reported for fields requested but not found.
80
81       -c, --contents archive
82           Lists the contents of the filesystem tree archive portion of the
83           package archive. It is currently produced in the format generated
84           by tar's verbose listing.
85
86       -x, --extract archive directory
87           Extracts the filesystem tree from a package archive into the
88           specified directory.
89
90           Note that extracting a package to the root directory will not
91           result in a correct installation! Use dpkg to install packages.
92
93           directory (but not its parents) will be created if necessary, and
94           its permissions modified to match the contents of the package.
95
96       -X, --vextract archive directory
97           Is like --extract (-x) with --verbose (-v) which prints a listing
98           of the files extracted as it goes.
99
100       -R, --raw-extract archive directory
101           Extracts the filesystem tree from a package archive into a
102           specified directory, and the control information files into a
103           DEBIAN subdirectory of the specified directory (since dpkg 1.16.1).
104
105           The target directory (but not its parents) will be created if
106           necessary.
107
108           The input archive is not (currently) processed sequentially, so
109           reading it from standard input («-») is not supported.
110
111       --ctrl-tarfile archive
112           Extracts the control data from a binary package and sends it to
113           standard output in tar format (since dpkg 1.17.14). Together with
114           tar(1) this can be used to extract a particular control file from a
115           package archive.  The input archive will always be processed
116           sequentially.
117
118       --fsys-tarfile archive
119           Extracts the filesystem tree data from a binary package and sends
120           it to standard output in tar format. Together with tar(1) this can
121           be used to extract a particular file from a package archive.  The
122           input archive will always be processed sequentially.
123
124       -e, --control archive [directory]
125           Extracts the control information files from a package archive into
126           the specified directory.
127
128           If no directory is specified then a subdirectory DEBIAN in the
129           current directory is used.
130
131           The target directory (but not its parents) will be created if
132           necessary.
133
134       -?, --help
135           Show the usage message and exit.
136
137       --version
138           Show the version and exit.
139

OPTIONS

141       --showformat=format
142           This option is used to specify the format of the output --show will
143           produce. The format is a string that will be output for each
144           package listed.
145
146           The string may reference any status field using the “${field-name}”
147           form, a list of the valid fields can be easily produced using -I on
148           the same package. A complete explanation of the formatting options
149           (including escape sequences and field tabbing) can be found in the
150           explanation of the --showformat option in dpkg-query(1).
151
152           The default for this field is “${Package}\t${Version}\n”.
153
154       -zcompress-level
155           Specify which compression level to use on the compressor backend,
156           when building a package (default is 9 for gzip, 6 for xz, 3 for
157           zstd).  The accepted values are compressor specific.  For gzip,
158           from 0-9 with 0 being mapped to compressor none.  For xz from 0-9.
159           For zstd from 0-22, with levels from 20 to 22 enabling its ultra
160           mode.  Before dpkg 1.16.2 level 0 was equivalent to compressor none
161           for all compressors.
162
163       -Scompress-strategy
164           Specify which compression strategy to use on the compressor
165           backend, when building a package (since dpkg 1.16.2). Allowed
166           values are none (since dpkg 1.16.4), filtered, huffman, rle and
167           fixed for gzip (since dpkg 1.17.0) and extreme for xz.
168
169       -Zcompress-type
170           Specify which compression type to use when building a package.
171           Allowed values are gzip, xz (since dpkg 1.15.6), zstd (since dpkg
172           1.21.18) and none (default is xz).
173
174       --[no-]uniform-compression
175           Specify that the same compression parameters should be used for all
176           archive members (i.e. control.tar and data.tar; since dpkg 1.17.6).
177           Otherwise only the data.tar member will use those parameters. The
178           only supported compression types allowed to be uniformly used are
179           none, gzip, xz and zstd.  The --no-uniform-compression option
180           disables uniform compression (since dpkg 1.19.0).  Uniform
181           compression is the default (since dpkg 1.19.0).
182
183       --threads-max=threads
184           Sets the maximum number of threads allowed for compressors that
185           support multi-threaded operations (since dpkg 1.21.9).
186
187       --root-owner-group
188           Set the owner and group for each entry in the filesystem tree data
189           to root with id 0 (since dpkg 1.19.0).
190
191           Note: This option can be useful for rootless builds (see
192           rootless-builds.txt), but should not be used when the entries have
193           an owner or group that is not root.  Support for these will be
194           added later in the form of a meta manifest.
195
196       --deb-format=format
197           Set the archive format version used when building (since dpkg
198           1.17.0).  Allowed values are 2.0 for the new format, and 0.939000
199           for the old one (default is 2.0).
200
201           The old archive format is less easily parsed by non-Debian tools
202           and is now obsolete; its only use is when building packages to be
203           parsed by versions of dpkg older than 0.93.76 (September 1995),
204           which was released as i386 a.out only.
205
206       --nocheck
207           Inhibits dpkg-deb --build's usual checks on the proposed contents
208           of an archive. You can build any archive you want, no matter how
209           broken, this way.
210
211       -v, --verbose
212           Enables verbose output (since dpkg 1.16.1).  This currently only
213           affects --extract making it behave like --vextract.
214
215       -D, --debug
216           Enables debugging output. This is not very interesting.
217

EXIT STATUS

219       0   The requested action was successfully performed.
220
221       2   Fatal or unrecoverable error due to invalid command-line usage, or
222           interactions with the system, such as accesses to the database,
223           memory allocations, etc.
224

ENVIRONMENT

226       DPKG_DEB_THREADS_MAX
227           Sets the maximum number of threads allowed for compressors that
228           support multi-threaded operations (since dpkg 1.21.9).
229
230           The --threads-max option overrides this value.
231
232       DPKG_DEB_COMPRESSOR_TYPE
233           Sets the compressor type to use (since dpkg 1.21.10).
234
235           The -Z option overrides this value.
236
237       DPKG_DEB_COMPRESSOR_LEVEL
238           Sets the compressor level to use (since dpkg 1.21.10).
239
240           The -z option overrides this value.
241
242       DPKG_COLORS
243           Sets the color mode (since dpkg 1.18.5).  The currently accepted
244           values are: auto (default), always and never.
245
246       TMPDIR
247           If set, dpkg-deb will use it as the directory in which to create
248           temporary files and directories.
249
250       SOURCE_DATE_EPOCH
251           If set, it will be used as the timestamp (as seconds since the
252           epoch) in the deb(5)'s ar(5) container and used to clamp the mtime
253           in the tar(5) file entries.
254

NOTES

256       Do not attempt to use just dpkg-deb to install software! You must use
257       dpkg proper to ensure that all the files are correctly placed and the
258       package's scripts run and its status and contents recorded.
259

BUGS

261       dpkg-deb -I package1.deb package2.deb does the wrong thing.
262
263       There is no authentication on .deb files; in fact, there isn't even a
264       straightforward checksum.  (Higher level tools like APT support
265       authenticating .deb packages retrieved from a given repository, and
266       most packages nowadays provide an md5sum control file generated by
267       debian/rules. Though this is not directly supported by the lower level
268       tools.)
269

SEE ALSO

271       /usr/share/doc/dpkg/spec/rootless-builds.txt, deb(5), deb-control(5),
272       dpkg(1), dselect(1).
273
274
275
2761.21.21                           2023-02-25                       dpkg-deb(1)
Impressum