devkult_
tools30converters34
home/mime/.deb

.deb MIME type

Debian packageapps & binaries

application/vnd.debian.binary-package

Software packages for Debian, Ubuntu and their derivatives.

MIME typeapplication/vnd.debian.binary-package
Extensions.deb
Also seen asapplication/x-debian-package
Content-Typeapplication/vnd.debian.binary-package
Compress in transit?No — already compressed
File signature21 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:

nginx (inside the types block in mime.types)
application/vnd.debian.binary-package deb;
Apache (.htaccess or server config)
AddType application/vnd.debian.binary-package .deb
Express
res.set("Content-Type", "application/vnd.debian.binary-package");
Python
import mimetypes

mimetypes.add_type("application/vnd.debian.binary-package", ".deb")
HTML file input
<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.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options