1dpkg-deb(1) dpkg suite dpkg-deb(1)
2
3
4
6 dpkg-deb - Debian package archive (.deb) manipulation tool
7
9 dpkg-deb [option...] command
10
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
26 -b, --build binary-directory [archive|directory]
27 Creates a debian archive from the filesystem tree stored in
28 binary-directory. binary-directory must have a DEBIAN
29 subdirectory, which contains the control information files such
30 as the control file itself. This directory will not appear in
31 the binary package's filesystem archive, but instead the files
32 in it will be put in the binary package's control information
33 area.
34
35 Unless you specify --nocheck, dpkg-deb will read DEBIAN/control
36 and parse it. It will check the file for syntax errors and other
37 problems, and display the name of the binary package being
38 built. dpkg-deb will also check the permissions of the
39 maintainer scripts and other files found in the DEBIAN control
40 information directory.
41
42 If no archive is specified then dpkg-deb will write the package
43 into the file binary-directory.deb.
44
45 If the archive to be created already exists it will be
46 overwritten.
47
48 If the second argument is a directory then dpkg-deb will write
49 to the file directory/package_version_arch.deb. When a target
50 directory is specified, rather than a file, the --nocheck option
51 may not be used (since dpkg-deb needs to read and parse the
52 package control file to determine which filename to use).
53
54 -I, --info archive [control-file-name...]
55 Provides information about a binary package archive.
56
57 If no control-file-names are specified then it will print a
58 summary of the contents of the package as well as its control
59 file.
60
61 If any control-file-names are specified then dpkg-deb will print
62 them in the order they were specified; if any of the components
63 weren't present it will print an error message to stderr about
64 each one and exit with status 2.
65
66 -W, --show archive
67 Provides information about a binary package archive in the
68 format specified by the --showformat argument. The default
69 format displays the package's name and version on one line,
70 separated by a tabulator.
71
72 -f, --field archive [control-field-name...]
73 Extracts control file information from a binary package archive.
74
75 If no control-field-names are specified then it will print the
76 whole control file.
77
78 If any are specified then dpkg-deb will print their contents, in
79 the order in which they appear in the control file. If more than
80 one control-field-name is specified then dpkg-deb will precede
81 each with its field name (and a colon and space).
82
83 No errors are reported for fields requested but not found.
84
85 -c, --contents archive
86 Lists the contents of the filesystem tree archive portion of the
87 package archive. It is currently produced in the format
88 generated by tar's verbose listing.
89
90 -x, --extract archive directory
91 Extracts the filesystem tree from a package archive into the
92 specified directory.
93
94 Note that extracting a package to the root directory will not
95 result in a correct installation! Use dpkg to install packages.
96
97 directory (but not its parents) will be created if necessary,
98 and its permissions modified to match the contents of the
99 package.
100
101 -X, --vextract archive directory
102 Is like --extract (-x) with --verbose (-v) which prints a
103 listing of the files extracted as it goes.
104
105 -R, --raw-extract archive directory
106 Extracts the filesystem tree from a package archive into a
107 specified directory, and the control information files into a
108 DEBIAN subdirectory of the specified directory (since dpkg
109 1.16.1).
110
111 The target directory (but not its parents) will be created if
112 necessary.
113
114 The input archive is not (currently) processed sequentially, so
115 reading it from standard input («-») is not supported.
116
117 --ctrl-tarfile archive
118 Extracts the control data from a binary package and sends it to
119 standard output in tar format (since dpkg 1.17.14). Together
120 with tar(1) this can be used to extract a particular control
121 file from a package archive. The input archive will always be
122 processed sequentially.
123
124 --fsys-tarfile archive
125 Extracts the filesystem tree data from a binary package and
126 sends it to standard output in tar format. Together with tar(1)
127 this can be used to extract a particular file from a package
128 archive. The input archive will always be processed
129 sequentially.
130
131 -e, --control archive [directory]
132 Extracts the control information files from a package archive
133 into the specified directory.
134
135 If no directory is specified then a subdirectory DEBIAN in the
136 current directory is used.
137
138 The target directory (but not its parents) will be created if
139 necessary.
140
141 -?, --help
142 Show the usage message and exit.
143
144 --version
145 Show the version and exit.
146
148 --showformat=format
149 This option is used to specify the format of the output --show
150 will produce. The format is a string that will be output for
151 each package listed.
152
153 The string may reference any status field using the “${field-
154 name}” form, a list of the valid fields can be easily produced
155 using -I on the same package. A complete explanation of the
156 formatting options (including escape sequences and field
157 tabbing) can be found in the explanation of the --showformat
158 option in dpkg-query(1).
159
160 The default for this field is “${Package}\t${Version}\n”.
161
162 -zcompress-level
163 Specify which compression level to use on the compressor
164 backend, when building a package (default is 9 for gzip, 6 for
165 xz). The accepted values are 0-9 with: 0 being mapped to
166 compressor none for gzip. Before dpkg 1.16.2 level 0 was
167 equivalent to compressor none for all compressors.
168
169 -Scompress-strategy
170 Specify which compression strategy to use on the compressor
171 backend, when building a package (since dpkg 1.16.2). Allowed
172 values are none (since dpkg 1.16.4), filtered, huffman, rle and
173 fixed for gzip (since dpkg 1.17.0) and extreme for xz.
174
175 -Zcompress-type
176 Specify which compression type to use when building a package.
177 Allowed values are gzip, xz (since dpkg 1.15.6), and none
178 (default is xz).
179
180 --uniform-compression
181 Specify that the same compression parameters should be used for
182 all archive members (i.e. control.tar and data.tar; since dpkg
183 1.17.6). Otherwise only the data.tar member will use those
184 parameters. The only supported compression types allowed to be
185 uniformly used are none, gzip and xz.
186
187 --deb-format=format
188 Set the archive format version used when building (since dpkg
189 1.17.0). Allowed values are 2.0 for the new format, and
190 0.939000 for the old one (default is 2.0).
191
192 The old archive format is less easily parsed by non-Debian tools
193 and is now obsolete; its only use is when building packages to
194 be parsed by versions of dpkg older than 0.93.76 (September
195 1995), which was released as i386 a.out only.
196
197 --nocheck
198 Inhibits dpkg-deb --build's usual checks on the proposed
199 contents of an archive. You can build any archive you want, no
200 matter how broken, this way.
201
202 -v, --verbose
203 Enables verbose output (since dpkg 1.16.1). This currently only
204 affects --extract making it behave like --vextract.
205
206 -D, --debug
207 Enables debugging output. This is not very interesting.
208
210 0 The requested action was successfully performed.
211
212 2 Fatal or unrecoverable error due to invalid command-line usage,
213 or interactions with the system, such as accesses to the
214 database, memory allocations, etc.
215
217 TMPDIR If set, dpkg-deb will use it as the directory in which to create
218 temporary files and directories.
219
220 SOURCE_DATE_EPOCH
221 If set, it will be used as the timestamp (as seconds since the
222 epoch) in the deb(5)'s ar(5) container and used to clamp the
223 mtime in the tar(5) file entries.
224
226 Do not attempt to use just dpkg-deb to install software! You must use
227 dpkg proper to ensure that all the files are correctly placed and the
228 package's scripts run and its status and contents recorded.
229
231 dpkg-deb -I package1.deb package2.deb does the wrong thing.
232
233 There is no authentication on .deb files; in fact, there isn't even a
234 straightforward checksum. (Higher level tools like APT support
235 authenticating .deb packages retrieved from a given repository, and
236 most packages nowadays provide an md5sum control file generated by
237 debian/rules. Though this is not directly supported by the lower level
238 tools.)
239
241 deb(5), deb-control(5), dpkg(1), dselect(1).
242
243
244
2451.18.25 2018-06-26 dpkg-deb(1)