.deb MIME type
Debian packageapps & binaries
application/vnd.debian.binary-packageSoftware packages for Debian, Ubuntu and their derivatives.
| MIME type | application/vnd.debian.binary-package |
|---|---|
| Extensions | .deb |
| Also seen as | application/x-debian-package |
| Content-Type | application/vnd.debian.binary-package |
| Compress in transit? | No — already compressed |
| File signature | 21 3C 61 72 63 68 3E (!<arch>) an ar archive holding debian-binary, control.tar.* and data.tar.* |
Good to know
- Install a downloaded package with
sudo apt install ./package.deb— the./makes apt treat it as a file and resolve its dependencies. - APT doesn't rely on the Content-Type; packages are verified against the repository's signed metadata.
Serve .deb files with the right type
The response header to send:
Content-Type: application/vnd.debian.binary-package
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
application/vnd.debian.binary-package deb;
AddType application/vnd.debian.binary-package .deb
res.set("Content-Type", "application/vnd.debian.binary-package");import mimetypes
mimetypes.add_type("application/vnd.debian.binary-package", ".deb")<input type="file" accept=".deb,application/vnd.debian.binary-package">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.deb | grep -i '^content-type:' file --mime-type file.deb
Frequently asked questions
What is the MIME type for .deb files?
application/vnd.debian.binary-package. You may also see application/x-debian-package, but application/vnd.debian.binary-package is the one to send.
What Content-Type header should a .deb file be served with?
Content-Type: application/vnd.debian.binary-package. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .deb?
Check its bytes rather than the extension: DEB files start with 21 3C 61 72 63 68 3E (!<arch>) — an ar archive holding debian-binary, control.tar.* and data.tar.*. On the command line, file --mime-type name.deb does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options