deb(5)
๐ deb(5) โ the Debian binary package format, explained by your favorite Unix bestie ๐
Okay so bestie, buckle up, because today we're talking about filename.deb โ yes, the actual deb(5) manpage from the dpkg suite, and no I will not be normal about it. โจ
๐ธ NAME ๐ธ
deb โ the Debian binary package format. That's it, that's the whole vibe. ๐
๐ฆ SYNOPSIS ๐ฆ
filename.deb
Honestly? Iconic. A whole format that's just... a filename ending in .deb. She said "my name is my whole identity" and she ATE. ๐
โจ DESCRIPTION โจ
The .deb format is the Debian binary package file format. Periodt. ๐ซถ
It's been supported since dpkg 0.93.76, and it's been generated by default since dpkg 1.2.0 and 1.1.1elf (that's the i386/ELF builds, iykyk). So like, she's been the main character for a minute. ๐
The format we're describing here is the one used since Debian 0.93 โ the ancient lore of the old format lives over in deb-old(5) if you're feeling nostalgic. ๐ง
๐ฅ FORMAT ๐ฅ
So the file is an ar archive with a magic value of !<arch>\n. Not me being obsessed with a magic string, but here we are. ๐ญ
Only the common ar archive format is supported โ no long file name extensions, bestie, we keep it simple. But file names can have an optional trailing slash, which caps their length at 15 characters (out of the 16 allowed). File sizes are limited to 10 ASCII decimal digits, which lets you have member files up to approximately 9536.74 MiB. Big, but not infinite. ๐
The tar archives currently allowed are:
- old-style (v7) format
- pre-POSIX ustar format
- a subset of the GNU format
- Support for new style long pathnames and long linknames since
dpkg 1.4.1.17. - Support for large file metadata since
dpkg 1.18.24.
- Support for new style long pathnames and long linknames since
- POSIX ustar format
- Support for long names since
dpkg 1.15.0.
- Support for long names since
Unrecognized tar typeflags are considered an error, no cap. ๐จ
By default each tar entry size inside a tar archive is limited to 11 ASCII octal digits, allowing for up to 8 GiB tar entries. The GNU large file metadata support permits 95-bit tar entry sizes and negative timestamps, plus 63-bit UID, GID and device numbers โ which basically amounts to practically unlimited values. She's got range. ๐
๐ the ar archive members, in order (this matters, bestie) ๐
The ar archive is composed of multiple members in a specific order, and the order is NOT a suggestion:
debian-binary
The first required member, containing a series of lines separated by newlines. Currently only one line is present โ the format version number, 2.0 at the time this manual page was written. Programs that read new-format archives should be prepared for the minor number to increase and for new lines to show up, and should ignore those if that happens. (Lowkey mature of them. ๐)
If the major number has changed, an incompatible change has been made and the program should stop. If it has not, then the program should be able to safely continue โ unless it encounters an unexpected member in the archive (except at the end), as described below. ๐
control.tar
The second required member is a tar archive containing the package metadata. It can use the following compression:
- none
- Supported since
dpkg 1.17.6.
- Supported since
- gzip (with
.gzextension) - xz (with
.xzextension)- Supported since
dpkg 1.17.6.
- Supported since
- zstd (with
.zstextension)- Supported since
dpkg 1.21.18.
- Supported since
It contains a series of plain files:
control
Mandatory control information, in deb822(5) format. Slay.
md5sums, conffiles, triggers, shlibs, symbols
Optional package metadata. The optional girlies. ๐
preinst, postinst, prerm, postrm
Optional maintainer scripts.
The control tarball may optionally contain an entry for ., the current directory. Cute. ๐
data.tar
The third and last required member contains the filesystem as a tar archive. It can use the following compression:
- none
- Supported since
dpkg 1.10.24.
- Supported since
- gzip (with
.gzextension) - xz (with
.xzextension)- Supported since
dpkg 1.15.6.
- Supported since
- zstd (with
.zstextension)- Supported since
dpkg 1.21.18.
- Supported since
- bzip2 (with
.bz2extension)- Supported since
dpkg 1.10.24.
- Supported since
- lzma (with
.lzmaextension)- Supported since
dpkg 1.13.25.
- Supported since
These members must occur in this exact order. Current implementations should ignore any additional members after data.tar. Further members may be defined in the future and (if possible) will be placed after these three. ๐
Any additional members that may need to be inserted after debian-binary and before control.tar or data.tar โ and which should be safely ignored by older programs โ will have names starting with an underscore, _.
๐ And the new members that won't be able to be safely ignored? Those get inserted before data.tar with names starting with something other than underscores, or (more likely) they'll just bump the major version number. So if you see a weird member name, maybe don't panic, but definitely pay attention, bestie.
๐ MEDIA TYPE ๐
Current โจ
application/vnd.debian.binary-package
The current one. The moment. The it-girl media type. ๐
Deprecated ๐ฅ
application/x-debian-package
application/x-deb
They're deprecated โ still here, still documented, but like... don't build new stuff around them, okay? ๐
๐ SEE ALSO ๐
deb-old(5), dpkg-deb(1), deb-control(5), deb-conffiles(5), deb-md5sums(5), deb-triggers(5), deb-shlibs(5), deb-symbols(5), deb-preinst(5), deb-postinst(5), deb-prerm(5), deb-postrm(5).
The whole friend group. Go read them, they're all baddies. ๐ซถ
๐ that's the whole page, bestie! this one's from the dpkg suite, version1.23.11-dirty, dated2026-09-09โ drink some water, rundpkg-deb -Ion something, and stan responsibly. mwah! ๐โจ
๐ฆ where this page comes from
- arch rolling: dpkg 1.23.11-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms