# .deb MIME Type: application/vnd.debian.binary-package

> Software 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 header: `application/vnd.debian.binary-package`
- Compress in transit: no (already compressed)
- File signature: `21 3C 61 72 63 68 3E` (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.

## Server configuration

### 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">
```

## FAQ

### 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

- [.rpm — application/x-rpm](https://www.devkult.com/mime/rpm.md)
- [.tar — application/x-tar](https://www.devkult.com/mime/tar.md)
- [.xz — application/x-xz](https://www.devkult.com/mime/xz.md)

Open the interactive page: https://www.devkult.com/mime/deb