1deb(5) dpkg suite deb(5)
2
3
4
6 deb - Debian binary package format
7
9 filename.deb
10
12 The .deb format is the Debian binary package file format. It is
13 understood since dpkg 0.93.76, and is generated by default since dpkg
14 1.2.0 and 1.1.1elf (i386/ELF builds).
15
16 The format described here is used since Debian 0.93; details of the old
17 format are described in deb-old(5).
18
20 The file is an ar archive with a magic value of !<arch>. Only the
21 common ar archive format is supported, with no long file name
22 extensions, but with file names containing an optional trailing slash,
23 which limits their length to 15 characters (from the 16 allowed). File
24 sizes are limited to 10 ASCII decimal digits, allowing for up to
25 approximately 9536.74 MiB member files.
26
27 The tar archives currently allowed are, the old-style (v7) format, the
28 pre-POSIX ustar format, a subset of the GNU format (new style long
29 pathnames and long linknames, supported since dpkg 1.4.1.17; large file
30 metadata since dpkg 1.18.24), and the POSIX ustar format (long names
31 supported since dpkg 1.15.0). Unrecognized tar typeflags are
32 considered an error. Each tar entry size inside a tar archive is
33 limited to 11 ASCII octal digits, allowing for up to 8 GiB tar entries.
34 The GNU large file metadata support permits 95-bit tar entry sizes and
35 negative timestamps, and 63-bit UID, GID and device numbers.
36
37 The first member is named debian-binary and contains a series of lines,
38 separated by newlines. Currently only one line is present, the format
39 version number, 2.0 at the time this manual page was written. Programs
40 which read new-format archives should be prepared for the minor number
41 to be increased and new lines to be present, and should ignore these if
42 this is the case.
43
44 If the major number has changed, an incompatible change has been made
45 and the program should stop. If it has not, then the program should be
46 able to safely continue, unless it encounters an unexpected member in
47 the archive (except at the end), as described below.
48
49 The second required member is named control.tar. It is a tar archive
50 containing the package control information, either not compressed
51 (supported since dpkg 1.17.6), or compressed with gzip (with .gz
52 extension) or xz (with .xz extension, supported since 1.17.6), zstd
53 (with .zst extension, supported since dpkg 1.21.18), as a series of
54 plain files, of which the file control is mandatory and contains the
55 core control information, the md5sums, conffiles, triggers, shlibs and
56 symbols files contain optional control information, and the preinst,
57 postinst, prerm and postrm files are optional maintainer scripts. The
58 control tarball may optionally contain an entry for ‘.’, the current
59 directory.
60
61 The third, last required member is named data.tar. It contains the
62 filesystem as a tar archive, either not compressed (supported since
63 dpkg 1.10.24), or compressed with gzip (with .gz extension), xz (with
64 .xz extension, supported since dpkg 1.15.6), zstd (with .zst extension,
65 supported since dpkg 1.21.18), bzip2 (with .bz2 extension, supported
66 since dpkg 1.10.24) or lzma (with .lzma extension, supported since dpkg
67 1.13.25).
68
69 These members must occur in this exact order. Current implementations
70 should ignore any additional members after data.tar. Further members
71 may be defined in the future, and (if possible) will be placed after
72 these three. Any additional members that may need to be inserted after
73 debian-binary and before control.tar or data.tar and which should be
74 safely ignored by older programs, will have names starting with an
75 underscore, ‘_’.
76
77 Those new members which won't be able to be safely ignored will be
78 inserted before data.tar with names starting with something other than
79 underscores, or will (more likely) cause the major version number to be
80 increased.
81
83 Current
84 application/vnd.debian.binary-package
85
86 Deprecated
87 application/x-debian-package
88
89 application/x-deb
90
92 deb-old(5), dpkg-deb(1), deb-control(5), deb-conffiles(5),
93 deb-md5sums(5), deb-triggers(5), deb-shlibs(5), deb-symbols(5), deb-
94 preinst(5), deb-postinst(5), deb-prerm(5), deb-postrm(5).
95
96
97
981.21.21 2023-02-25 deb(5)