Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Deb (file format)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Debian software package format}} {{lowercase title}} {{Infobox file format | name = Debian package | icon = | logo = | screenshot = [[File:Application-x-deb.svg|64px]] | caption = The [[GNOME]] icon for deb files<br />(showing the [[Debian]] logo on a package) | extension = .deb, .udeb | mime = application/vnd.debian.binary-package<ref>{{cite web | title = Media Type Registration for vnd.debian.binary-package | url = https://www.iana.org/assignments/media-types/application/vnd.debian.binary-package | publisher = [[Internet Assigned Numbers Authority]] | access-date = 21 May 2014}}</ref> | type code = | uniform type = | magic = | owner = [[Debian]] | released = | latest release version = | latest release date = | genre = [[Package management system]] | container for = [[Software package (installation)|Software package]] | contained by = | extended from = [[ar (Unix)|ar archive]], [[Tar (file format)|tarball]] | extended to = | standard = | url = [https://manpages.debian.org/unstable/deb.5 deb format specification] }} '''deb''' is the format, as well as [[filename extension]] of the [[package manager|software package]] format for the [[Debian]] [[Linux distribution]] and [[List of Linux distributions#Debian-based|its derivatives]]. ==Design== [[File:Gdebi.png|thumb|right|GDebi installing a .deb package]] Debian packages are standard [[Unix]] [[ar (Unix)|ar archives]] that include two [[tar (computing)|tar]] archives. One archive holds the control information and another contains the installable data.<ref name="rh20100917">{{cite web|url=https://raphaelhertzog.com/2010/09/17/how-to-create-debian-packages-with-alternative-compression-methods/|title=How to create Debian packages with alternative compression methods|author=Raphaël Hertzog|date=17 Sep 2010|website=raphaelhertzog.com|access-date=26 Aug 2016}}</ref> [[dpkg]] provides the basic functionality for installing and manipulating Debian packages. Generally end users don't manage packages directly with [[dpkg]] but instead use the [[APT (Package Manager)|APT]] package management software or other [[APT (Package Manager)#Front-ends|APT front-ends]] such as [[aptitude (software)|aptitude]] ([[nCurses]]) and [[Synaptic (software)|synaptic]] ([[GTK]]).<ref>{{cite web|url=https://wiki.debian.org/Courses/MaintainingPackages/Packages/Management|title=Debian Courses/Maintaining Packages/Packages Management|author=<!--Staff writers; no by-line.-->|date=31 Oct 2010|website=debian.org|access-date=26 Aug 2016}}</ref> Debian packages can be converted into other package formats and vice versa using [[Alien (file converter)|alien]], and created from source code using [[checkinstall]] or the Debian Package Maker.<ref>{{cite web|url=https://www.debian.org/doc/manuals/developers-reference/apa.en.html#alien|title=Overview of Debian Maintainer Tools / Alien|author=<!--Staff writers; no by-line.-->|date=n.d.|website=debian.org|access-date=26 Aug 2016}}</ref> Some core Debian packages are available as '''udeb'''s ("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.<ref>{{cite web|url=http://d-i.alioth.debian.org/doc/internals/ch03.html|title=Chapter 3. D-I components or udebs|author=<!--Staff writers; no by-line.-->|date=n.d.|website=debian.org|access-date=26 Aug 2016|archive-url=https://web.archive.org/web/20111203083145/http://d-i.alioth.debian.org/doc/internals/ch03.html|archive-date=3 December 2011|url-status=dead}}</ref> In particular, documentation files are normally omitted. ''udeb'' packages are not installable on a standard Debian system, but are used in [[Debian-Installer]]. ==Implementation== [[File:Deb File Structure.svg|thumb|Diagram showing an example file structure of a .deb file|right]][[File:Frhed hex editor displaying deb package.png|thumb|[[Frhed|Frhed hex editor]] displaying the raw data of a Debian package|right]] Prior to Debian 0.93, a package consisted of a file header and two concatenated [[gzip]] archives.<ref>{{cite web|url=https://manpages.debian.org/unstable/deb-old.5|title=deb-old(5) man page: Debian old binary package format|website=manpages.debian.org|access-date=2017-04-23}}</ref> Since Debian 0.93, a deb package is implemented as an [[Ar (Unix)|ar archive]].<ref>{{cite web|url=https://www.debian.org/doc/manuals/packaging-tutorial/packaging-tutorial.en.pdf#page=7|title=Debian Packaging Tutorial|author=Lucas Nussbaum|date=16 Oct 2014|website=debian.org|access-date=26 Aug 2016}}</ref> This archive contains three files in a specific order:<ref name="manpagedeb5">{{cite web|url=https://manpages.debian.org/unstable/deb.5|title=deb(5) man page: Debian binary package format|website=manpages.debian.org|access-date=2017-04-23}}</ref><ref name="tldp001">{{cite web |author=<!--Staff writers; no by-line.--> |date=n.d. |title=Debian Binary Package Building HOWTO/3. Package Structure |url=https://www.tldp.org/HOWTO/Debian-Binary-Package-Building-HOWTO/x60.html |access-date=26 Aug 2016 |website=tldp.org}}</ref> # '''debian-binary''' - A text file named <code>debian-binary</code> containing a single line giving the package format version number. (<code>2.0</code> for current versions of Debian).<ref name="tldp001"/> # '''control archive''' - A tar archive named <code>control.tar</code> contains the maintainer scripts and the package meta-information (package name, version, dependencies and maintainer). Compressing the archive with [[gzip]] or [[XZ Utils|xz]] and [[zstd]] is supported. The file extension changes to indicate the compression method.<ref name="tldp001"/><ref name="rh20100917"/> # '''data archive''' - A tar archive named <code>data.tar</code> contains the actual installable files. Compressing the archive with [[gzip]], [[bzip2]], [[lzma]] or [[XZ Utils|xz]] and [[zstd]] is supported. The file extension changes to indicate the compression method.<ref name="tldp001"/><ref name="rh20100917"/> ===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.<ref>{{cite web|url=https://manpages.debian.org/unstable/deb-control.5|title=deb-control(5) man page: Debian packages' master control file format|author=<!--Staff writers; no by-line.-->|website=manpages.debian.org|access-date=2017-04-23}}</ref><ref>{{cite web|url=https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-binarycontrolfiles|title=Debian Policy Manual Chapter 5 - Control files and their fields|author=<!--Staff writers; no by-line.-->|date=30 Mar 2016|website=debian.org|access-date=26 Aug 2016}}</ref><ref>{{cite web|url=https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control|title=Debian New Maintainers' Guide - Ch4 Required files under the debian directory|author=Josip Rodin and Osamu Aoki|date=9 Jun 2015|website=debian.org|access-date=26 Aug 2016}}</ref><ref>{{cite web|url=https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps|title=Debian Policy Manual Ch7 - Declaring relationships between packages|author=<!--Staff writers; no by-line.-->|date=30 Mar 2016|website=debian.org|access-date=26 Aug 2016}}</ref> * '''md5sums''' contains [[MD5]] [[checksum]]s of all files in the package in order to detect corrupt or incomplete files.<ref>{{cite web|url=https://debian-handbook.info/browse/stable/sect.package-meta-information.html|title=The Debian Administrator's Handbook - Package Meta-Information|author=<!--Staff writers; no by-line.-->|date=n.d.|website=debian-handbook.info|access-date=26 Aug 2016}}</ref> * '''conffiles''' lists the files of the package that should be treated as configuration files. Configuration files are not overwritten during an update unless specified.<ref name="debian-faq-7">{{cite web|url=https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html|title=Chapter 7. Basics of the Debian package management system|author=<!--Staff writers; no by-line.-->|date=12 August 2019|website=debian.org|access-date=27 May 2021}}</ref> * '''preinst''', '''postinst''', '''prerm''' and '''postrm''' are optional scripts that are executed before or after installing or removing the package.<ref name="debian-faq-7"/><ref>{{cite web|url=https://wiki.debian.org/MaintainerScripts|title=Debian Maintainer Scripts|author=<!--Staff writers; no by-line.-->|date=11 Oct 2012|website=debian.org|access-date=26 Aug 2016}}</ref> * '''config''' is an optional script that supports the [[debconf (software package)|debconf]] configuration mechanism.<ref>{{cite web |author=Joey Hess |date=n.d. |title=The Debconf Programmer's Tutorial - The Config Script |url=https://www.fifi.org/doc/debconf-doc/tutorial.html#AEN113 |access-date=26 Aug 2016 |website=fifi.org}}</ref> * '''shlibs''' list of shared library dependencies.<ref>{{cite web|url=https://manpages.debian.org/unstable/dpkg-shlibdeps.1|title=dpkg-shlibdeps(1) man page|author=<!--Staff writers; no by-line.-->|website=manpages.debian.org|access-date=2017-04-23}}</ref><ref>{{cite web|url=https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-depends|title=Debian Policy - 8.6 Dependencies between the library and other packages|author=<!--Staff writers; no by-line.-->|date=30 Mar 2016|website=debian.org|access-date=26 Aug 2016}}</ref> ===Signed packages=== Debian-based distributions support [[OpenPGP]] signature verification of signed Debian packages, but most (if not all) have this feature disabled by default.<ref name="packagecloud20141028">{{cite web |author=Joe Damato |date=28 Oct 2014 |title=HOWTO: GPG sign and verify deb packages and APT repositories |url=https://blog.packagecloud.io/eng/2014/10/28/howto-gpg-sign-verify-deb-packages-apt-repositories/ |access-date=26 Aug 2016 |website=packagecloud.io}}</ref> Instead packages are verified by signing the repository metadata (i.e. <kbd>Release</kbd> files). The metadata files in turn include checksums for the repository files as a means to verify authenticity of the files.<ref>{{cite web |author=<!--Staff writers; no by-line.--> |date=4 Aug 2015 |title=APT repository internals |url=https://blog.packagecloud.io/eng/2015/08/04/apt-repository-internals/ |access-date=26 Aug 2016 |website=packagecloud.io}}</ref><ref>{{cite web|url=https://wiki.debian.org/SecureApt|title=SecureApt - All about secure apt|author=<!--Staff writers; no by-line.-->|date=22 Sep 2015|website=debian.org|access-date=26 Aug 2016}}</ref> Currently there are two different implementations for signing individual packages. The first is done via the <kbd>debsigs</kbd> / <kbd>debsig-verify</kbd> toolset, which is supported by [[dpkg]].<ref name="packagecloud20141028"/><ref>{{cite web|url=https://manpages.debian.org/unstable/debsig-verify.1|title=debsig-verify(1) man page|author=<!--Staff writers; no by-line.-->|website=manpages.debian.org|access-date=2017-04-23}}</ref> The second is done through the <kbd>dpkg-sig</kbd> program which is not supported by [[dpkg]], so the packages have to be manually checked with the <kbd>dpkg-sig</kbd> program.<ref name="packagecloud20141028"/><ref>{{cite web|url=https://manpages.debian.org/unstable/debsigs.1|title=debsigs(1) man page|author=<!--Staff writers; no by-line.-->|website=manpages.debian.org|access-date=2017-04-23}}</ref><ref>{{cite web|url=http://dpkg-sig.turmzimmer.net/ |title=Integrating signatures into Debian archive files |author=Andreas Barth |date=29 Dec 2003 |website=turmzimmer.net |access-date=29 Dec 2003 |url-status=bot: unknown |archive-url=https://web.archive.org/web/20060222013602/http://dpkg-sig.turmzimmer.net/ |archive-date=2006-02-22}}</ref><ref>{{cite web|url=http://dpkg-sig.turmzimmer.net/policy.html |title=policy for debsigs |date=1 Feb 2004 |website=turmzimmer.net |access-date=1 Feb 2004 |url-status=bot: unknown |archive-url=https://web.archive.org/web/20060714233154/http://dpkg-sig.turmzimmer.net/policy.html |archive-date=2006-07-14}}</ref> Both formats add new sections to the [[Ar (Unix)|ar archive]] to store the signature information, but the formats are not compatible with one another.<ref name="packagecloud20141028"/> Neither of the modifications to the package format are listed in the official Debian handbook or [[man page]] about the binary package format.<ref>{{cite web|url=https://www.debian.org/doc/manuals/debian-handbook/packaging-system.en.html|title=The Debian Administrator's Handbook - Ch5. Packaging System: Tools and Fundamental Principles|author=<!--Staff writers; no by-line.-->|date=n.d.|website=debian.org|access-date=26 Aug 2016}}</ref><ref name="manpagedeb5"/> ==Adoption== * Debian packages are used in distributions [[List of Linux distributions#Debian-based|based on Debian]], such as, [[Linux Mint]] (LMDE),<ref>{{Cite web |last=Kumar |first=Sarvottam |date=2020-07-03 |title=Linux Mint 20 "Ulyana" Review: The Most Complete OS For Everyone |url=https://fossbytes.com/linux-mint-20-ulyana-review/ |url-status=live |archive-url=https://archive.today/20240515203221/https://fossbytes.com/linux-mint-20-ulyana-review/ |archive-date=2024-05-15 |access-date=2024-05-15 |website=Fossbytes |language=en-US}}</ref><ref>{{Cite web |last=Saive |first=Ravi |date=2022-12-12 |title=3 Ways to Install Deb Packages in Ubuntu, Mint & Debian |url=https://www.ubuntumint.com/install-deb-files-ubuntu-mint-debian/ |url-status=live |archive-url=https://archive.today/20240515203108/https://www.ubuntumint.com/install-deb-files-ubuntu-mint-debian/ |archive-date=2024-05-15 |access-date=2024-05-15 |website=www.ubuntumint.com |language=en-US}}</ref> [[KDE neon]], [[Ubuntu (operating system)|Ubuntu]] and [[List of Linux distributions#Debian-based|many others]]. * [[Fink (software)|Fink]], a port of [[dpkg]] and [[Advanced Packaging Tool|APT]] to [[macOS]], uses deb packages.<ref>{{cite web |author=<!--Staff writers; no by-line.--> |date=6 Jun 2015 |title=Fink FAQ - General Questions |url=https://www.finkproject.org/faq/general.php |access-date=26 Aug 2016 |website=finkproject.org}}</ref><ref>{{cite web |author=<!--Staff writers; no by-line.--> |date=6 Jun 2015 |title=Fink FAQ - Installing, Using and Maintaining Fink |url=https://www.finkproject.org/faq/usage-fink.php |access-date=26 Aug 2016 |website=finkproject.org}}</ref> * [[Nexenta OS]], a discontinued OS based on [[OpenSolaris]], included Debian package management software and the use of deb packages. * [[Debian GNU/kFreeBSD]], an OS that uses a GNU based [[User space|userland]] and the FreeBSD kernel. * [[Debian GNU/Hurd]]. * Some [[IOS jailbreaking|jailbroken]] iOS devices (iPhones, iPads and iPods).<ref>{{cite web |author=Jay Freeman |date=n.d. |title=Bringing Debian APT to the iPhone |url=https://www.saurik.com/id/1 |access-date=26 Aug 2016 |website=saurik.com}}</ref><ref>{{cite web|url=https://www.engadget.com/2008/02/28/debian-style-installation-arrives-on-iphone/|title=Debian-style installation arrives on iPhone|author=Erica Sadun|date=28 Feb 2008|website=engadget.com|access-date=26 Aug 2016}}</ref> * [[Ipkg]] and [[Opkg]], which both use .ipk packages that resemble [[Debian]]'s [[dpkg]] * [[Termux]], which is a [[GNU]] environment for [[Android (operating system)|Android]]. ==See also== * [[List of archive formats]] * [[dpkg]] * [[wpkg (Windows Packager)|wpkg]] * [[CheckInstall]] * [[List of software package management systems]] ==References== {{Reflist|2}} ==External links== * [https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html Debian FAQ: Basics of the Debian package management system] * [https://antumdeluge.github.io/debreate-web/ Debreate - A powerful Debian Package Builder] * [https://wiki.debian.org/Teams/Dpkg/DebSupport .deb feature support] * [https://web.archive.org/web/20160307164024/https://lists.debian.org/debian-user/2001/07/msg00645.html Manipulating debs directly with standard utilities] * [https://www.youtube.com/watch?v=lFzPrzY2KFM&v3 Anatomy of a Debian package video] {{Debian}} {{Archive formats}} {{Package management systems}} [[Category:Archive formats]] [[Category:Debian]] [[Category:Dpkg]] [[Category:Filename extensions]] [[Category:Ubuntu]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Archive formats
(
edit
)
Template:Cite web
(
edit
)
Template:Debian
(
edit
)
Template:Infobox file format
(
edit
)
Template:Lowercase title
(
edit
)
Template:Package management systems
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)