deb is the format, as well as
extension
Extension, extend or extended may refer to:
Mathematics
Logic or set theory
* Axiom of extensionality
* Extensible cardinal
* Extension (model theory)
* Extension (predicate logic), the set of tuples of values that satisfy the predicate
* E ...
of the
software package format for the
Debian Linux distribution
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one ...
and
its derivatives.
Design
![Gdebi](https://upload.wikimedia.org/wikipedia/commons/a/af/Gdebi.png)
Debian packages are standard
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
ar archives that include two
tar
Tar is a dark brown or black viscous liquid of hydrocarbons and free carbon, obtained from a wide variety of organic materials through destructive distillation. Tar can be produced from coal, wood, petroleum, or peat. "a dark brown or black bit ...
archives. One archive holds the control information and another contains the installable data.
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
provides the basic functionality for installing and manipulating Debian packages. Generally end users don't manage packages directly with
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
but instead use the
APT
Apt. is an abbreviation for apartment.
Apt may also refer to:
Places
* Apt Cathedral, a former cathedral, and national monument of France, in the town of Apt in Provence
* Apt, Vaucluse, a commune of the Vaucluse département of France
* A ...
package management software or other
APT front-ends such as
aptitude
An aptitude is a component of a competence to do a certain kind of work at a certain level. Outstanding aptitude can be considered "talent". Aptitude is inborn potential to perform certain kinds of activities, whether physical or mental, and ...
(
nCurses
ncurses (new curses) is a programming library providing an application programming interface (API) that allows the programmer to write text-based user interfaces (TUI) in a terminal-independent manner. It is a toolkit for developing "GUI-like" ...
) and
synaptic (
GTK
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
).
Debian packages can be converted into other package formats and vice versa using
alien
Alien primarily refers to:
* Alien (law), a person in a country who is not a national of that country
** Enemy alien, the above in times of war
* Extraterrestrial life, life which does not originate from Earth
** Specifically, intelligent extrater ...
, and created from source code using
checkinstall
CheckInstall is a computer program for Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any ...
or the Debian Package Maker.
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
Debian-Installer is a system installer designed for the Debian Linux distribution. It originally appeared in the Debian release 3.1 (Sarge), released on June 6, 2005, although the first release of a Linux distribution that used it was Skolelinux ...
.
Implementation
![Deb File Structure](https://upload.wikimedia.org/wikipedia/commons/6/67/Deb_File_Structure.svg)
![Frhed hex editor displaying deb package](https://upload.wikimedia.org/wikipedia/commons/3/3f/Frhed_hex_editor_displaying_deb_package.png)
Prior to Debian 0.93, a package consisted of a file header and two concatenated
gzip
gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and i ...
archives. Since Debian 0.93, a deb package is implemented as an
ar archive. This archive contains three files in a specific order:
# debian-binary - A text file named
debian-binary
containing a single line giving the package format version number. (
2.0
for current versions of Debian).
# control archive - A tar archive named
control.tar
contains the maintainer scripts and the package meta-information (package name, version, dependencies and maintainer). Compressing the archive with
gzip
gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and i ...
or
xz is supported. The file extension changes to indicate the compression method.
# data archive - A tar archive named
data.tar
contains the actual installable files. Compressing the archive with
gzip
gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and i ...
,
bzip2,
lzma or
xz is supported. The file extension changes to indicate the compression method.
Control archive
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 checksum
A checksum is a small-sized block of data derived from another block of digital data for the purpose of detecting errors that may have been introduced during its transmission or storage. By themselves, checksums are often used to verify data ...
s 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 or removing the package.
* config is an optional script that supports the
debconf configuration mechanism.
* shlibs list of shared library dependencies.
Signed packages
Debian-based distributions support
OpenPGP
Pretty Good Privacy (PGP) is an encryption program that provides cryptographic privacy and authentication for data communication. PGP is used for signing, encrypting, and decrypting texts, e-mails, files, directories, and whole disk partiti ...
signature verification of signed Debian packages, but most (if not all) have this feature disabled by default.
Instead packages are verified by signing the repository metadata (i.e.
Release files). The metadata files in turn include checksums for the repository files as a means to verify authenticity of the files. Currently there are two different implementations for signing individual packages. The first is done via the
debsigs /
debsig-verify toolset, which is supported by
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
.
The second is done through the
dpkg-sig program which is not supported by
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
, so the packages have to be manually checked with the
dpkg-sig program.
Both formats add new sections to the
ar archive to store the signature information, but the formats are not compatible with one another.
Neither of the modifications to the package format are listed in the official Debian handbook or
man page
A man page (short for manual page) is a form of software documentation usually found on a Unix or Unix-like operating system. Topics covered include computer programs (including library and system calls), formal standards and conventions, and e ...
about the binary package format.
Adoption
* Debian packages are used in distributions based on Debian, such as
Ubuntu
Ubuntu ( ) is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: '' Desktop'', ''Server'', and ''Core'' for Internet of things devices and robots. All ...
and
many others
Many may refer to:
* grammatically plural in number
*an English quantifier used with count nouns indicating a large but indefinite number of; at any rate, more than a few
;Place names
* Many, Moselle, a commune of the Moselle department in Franc ...
.
*
Fink, a port of
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
and
APT
Apt. is an abbreviation for apartment.
Apt may also refer to:
Places
* Apt Cathedral, a former cathedral, and national monument of France, in the town of Apt in Provence
* Apt, Vaucluse, a commune of the Vaucluse département of France
* A ...
to
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
, uses deb packages.
*
Nexenta OS
Nexenta OS, officially known as the Nexenta Core Platform, is a discontinued computer operating system based on OpenSolaris and Ubuntu that runs on IA-32- and x86-64-based systems. It emerged in fall 2005, after Sun Microsystems started t ...
, a discontinued OS based on
OpenSolaris
OpenSolaris () is a discontinued open-source computer operating system based on Solaris and created by Sun Microsystems. It was also, perhaps confusingly, the name of a project initiated by Sun to build a developer and user community around th ...
, included Debian package management software and the use of deb packages.
*
Debian GNU/kFreeBSD
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of D ...
, an OS that uses a GNU based
userland and the FreeBSD kernel.
*
Debian GNU/Hurd
Debian (), also known as Debian GNU/Linux, is a Linux distribution composed of free and open-source software, developed by the community-supported Debian Project, which was established by Ian Murdock on August 16, 1993. The first version of Deb ...
.
* Some
jailbroken iOS devices (iPhones, iPads and iPods).
*
Ipkg
ipkg, or the Itsy Package Management System, is a discontinued lightweight package management system designed for embedded devices that resembles Debian's dpkg. It was used in the Unslung operating system for the Linksys NSLU2 ( Optware), i ...
and
Opkg
opkg (''open package management'') is a lightweight package management system based upon ipkg. It is written in C and resembles Advanced Package Tool (APT)/ dpkg in operation. It is intended for use on embedded Linux devices and is used in this ...
, which both use .ipk packages that resemble
Debian's
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
*
Termux
Termux is a free and open source terminal emulator for Android which allows for running a Linux environment on an Android device. In addition, various software can be installed through the application's package manager.
Termux installs a minim ...
, which is a
GNU
GNU () is an extensive collection of free software (383 packages as of January 2022), which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operat ...
environment for
Android.
See also
*
List of archive formats
This is a list of file formats used by archivers and compressors used to create archive files.
Archiving only
Compression only
Archiving and compression
Data recovery
Comparison Containers and compression
Notes
While the original ...
*
dpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
*
wpkg
dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages.
dpkg (Debian Package) itself is ...
*
CheckInstall
CheckInstall is a computer program for Unix-like
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any ...
*
List of software package management systems
References
External links
Debian FAQ: Basics of the Debian package management systemDebreate - A powerful Debian Package Builder.deb feature supportAnatomy of a Debian package video
{{Package management systems
Archive formats
Debian
Dpkg
Filename extensions
Ubuntu