deb (file format)
The GNOME icon for deb files
|Internet media type||
|Type of format||Package management system|
|Container for||Software package|
|Extended from||ar archive, tarball|
Debian packages are standard Unix ar archives that include two tar archives optionally compressed with gzip (zlib), Bzip2, lzma, or xz (lzma2): one archive holds the control information and another contains the installable data.
Some core Debian packages are available as udebs ("micro debs"), and are typically used only for bootstrapping a Debian installation. Although these files use the udeb filename extension, they adhere to the same structure specification as ordinary deb files. However, unlike their deb counterparts, udeb packages contain only essential functional files. In particular, documentation files are normally omitted. udeb packages are not installable on a standard Debian system, but are used in Debian-Installer.
- Global Header: This contains the file signature and the first file header which includes the
debian-binarypackage identifier and the deb format version number. This is
2.0for current versions of Debian.
- Control Section: This contains a control archive (Usually named
control.tar.xz). This archive includes all package meta-information. It tells dpkg what to configure when the package is being installed.
- Data Section: This contains a data archive (Usually named
data.tar.xz). This archive includes the actual installable files.
Each file stored in an ar archive includes a file header to store information about the file. The common format is as follows. Numeric values are encoded in ASCII and all values right-padded with ASCII spaces (0x20).
|16||12||File modification timestamp||Decimal|
|48||10||File size in bytes||Decimal|
|58||2||Ending characters||0x60 0x0A|
Directly following a file header is the file data for the file described in the header. .deb files use three file headers, the first is used to identify the ar archive as a Debian package. This is done in the first file header by setting the file identifier to
debian-binary, then using the file data section to define the package version number. The other two file headers are to define the control and data sections.
The control archive contents can include the following files:
- control contains a brief description of the package as well as other information such as its dependencies.
- md5sums contains MD5 checksums of all files in the package in order to detect corrupt or incomplete files.
- conffiles lists the files of the package that should be treated as configuration files. Configuration files are not overwritten during an update unless specified.
- preinst, postinst, prerm and postrm are optional scripts that are executed before or after installing, updating or removing the package.
- config is an optional script that supports the debconf configuration mechanism.
- shlibs list of shared library dependencies.
- Debian packages are used in distributions based on Debian, such as Ubuntu, Cydia and many others.
- Fink a port of dpkg and APT to Mac OS X use deb packages.
- Nexenta OS a OpenSolaris based OS. The operating system included Debian package management software which included to use of deb packages.
- Debian GNU/kFreeBSD a OS that uses a GNU based userland and the FreeBSD kernel.
- Debian GNU/Hurd
- Cydia package manager used on jailbroken iOS devices (iPhones, iPads and iPods).
- Debian FAQ: Basics of the Debian package management system
- Debreate - Debian Package Creator GUI
- .deb feature support
- Manipulating debs directly with standard utilities
- "Media Type Registration for vnd.debian.binary-package". Internet Assigned Numbers Authority. Retrieved 21 May 2014.