deb(5) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | FORMAT | MEDIA TYPE | SEE ALSO | COLOPHON

deb(5)                          dpkg suite                         deb(5)

NAME         top

       deb - Debian binary package format

SYNOPSIS         top

       filename.deb

DESCRIPTION         top

       The .deb format is the Debian binary package file format.  It is
       understood since dpkg 0.93.76, and is generated by default since
       dpkg 1.2.0 and 1.1.1elf (i386/ELF builds).

       The format described here is used since Debian 0.93; details of
       the old format are described in deb-old(5).

FORMAT         top

       The file is an ar archive with a magic value of !<arch>.  Only the
       common ar archive format is supported, with no long file name
       extensions, but with file names containing an optional trailing
       slash, which limits their length to 15 characters (from the 16
       allowed).  File sizes are limited to 10 ASCII decimal digits,
       allowing for up to approximately 9536.74 MiB member files.

       The tar archives currently allowed are:

       •   old-style (v7) format

       •   pre-POSIX ustar format

       •   subset of the GNU format

           New style long pathnames and long linknames, supported since
           dpkg 1.4.1.17; large file metadata since dpkg 1.18.24.

       •   POSIX ustar format

           Long names supported since dpkg 1.15.0.

       Unrecognized tar typeflags are considered an error.  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, and 63-bit UID, GID and device numbers, which amounts
       to practically unlimited values.

       The ar archive is composed of multiple members in a specific
       order:

       debian-binary
           The first required member contains 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 which read new-format archives should
           be prepared for the minor number to be increased and new lines
           to be present, and should ignore these if this is the case.

           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)

           •   gzip (with .gz extension)

           •   xz (with .xz extension, supported since dpkg 1.17.6)

           •   zstd (with .zst extension, supported since dpkg 1.21.18)

           It contains a series of plain files:

           control
               Mandatory control information, in deb822(5) format.

           md5sums
           conffiles
           triggers
           shlibs
           symbols
               Optional package metadata.

           preinst
           postinst
           prerm
           postrm
               Optional maintainer scripts.

           The control tarball may optionally contain an entry for ‘.’,
           the current directory.

       data.tar
           The third, last required member contains the filesystem as a
           tar archive.

           It can use the following compression:

           •   none (supported since dpkg 1.10.24)

           •   gzip (with .gz extension)

           •   xz (with .xz extension, supported since dpkg 1.15.6)

           •   zstd (with .zst extension, supported since dpkg 1.21.18)

           •   bzip2 (with .bz2 extension, supported since dpkg 1.10.24)

           •   lzma (with .lzma extension, supported since dpkg 1.13.25)

       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,
       ‘_’.

       Those new members which won't be able to be safely ignored will be
       inserted before data.tar with names starting with something other
       than underscores, or will (more likely) cause the major version
       number to be increased.

MEDIA TYPE         top

   Current
       application/vnd.debian.binary-package

   Deprecated
       application/x-debian-package

       application/x-deb

SEE ALSO         top

       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).

COLOPHON         top

       This page is part of the dpkg (Debian Package Manager) project.
       Information about the project can be found at 
       ⟨https://wiki.debian.org/Teams/Dpkg/⟩.  If you have a bug report
       for this manual page, see
       ⟨http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=dpkg⟩.  This
       page was obtained from the project's upstream Git repository ⟨git
       clone https://git.dpkg.org/git/dpkg/dpkg.git⟩ on 2026-01-16.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2025-12-20.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

1.23.3-2-gade55                 2025-12-20                         deb(5)

Pages that refer to this page: dpkg(1)dpkg-deb(1)dpkg-name(1)dpkg-split(1)dselect(1)deb-control(5)deb-old(5)deb-split(5)deb-version(7)