How to fix dpkg: error: archive 'filename.deb' uses unknown compression in APT

APTINTERMEDIATEMEDIUMUpdated Dec 29, 2025· 401 views

This error occurs when installing .deb packages that use zstd (Zstandard) compression on systems with older dpkg versions that don't support it. Common on Debian 11 and Raspberry Pi systems trying to install newer packages. Fix by upgrading dpkg, installing zstd, or repackaging the .deb file.

Quick fix

Fixes dpkg: error: archive 'filename.deb' uses unknown compression

dpkg --version
  1. Check your dpkg version
  2. Try installing zstd support (Quick Fix)
  3. Upgrade dpkg (Recommended for newer systems)
  4. Repackage the .deb with compatible compression (Workaround)
apt — error
dpkg --version
dpkg: error: archive 'filename.deb' uses unknown compression

What this error means

When you try to install a .deb file, dpkg inspects the archive structure to extract the control and data tarballs. Newer Debian and Ubuntu distributions (21.10+) default to zstd compression for these internal archives. However, older dpkg versions (before 1.21.0) only support gzip and xz compression, so they fail with an "unknown compression" error when encountering zstd-compressed members. This is a compatibility issue between newer packages and older system tools.

Typical symptoms

  • apt install fails with "dpkg-deb: error: archive uses unknown compression"
  • Installation stops at dependency resolution or at the actual package extraction
  • Error message specifies "control.tar.zst" or "data.tar.zst" as the problematic member
  • Works on newer Ubuntu/Debian systems but fails on Debian 11 (Bullseye) or Raspberry Pi

Common causes

  1. Package was built on Ubuntu 21.10+ or Debian 12+ (which default to zstd compression)
  2. Target system is running Debian 11 (Bullseye) or older with dpkg version 1.20.9 or earlier
  3. dpkg version on the target system does not include zstd support (needs 1.21.0+)
  4. zstd library is not installed on the system (even if dpkg supports it)

How to fix "dpkg: error: archive 'filename.deb' uses unknown compression"

1Check your dpkg version

First, verify which version of dpkg is installed:

bash
dpkg --version

Look for the version number. If it's 1.21.0 or newer, your dpkg should support zstd. If it's 1.20.9 or older, you'll need to upgrade.

2Try installing zstd support (Quick Fix)

Some systems can handle zstd-compressed packages if the zstd library is installed:

bash
sudo apt-get update
sudo apt-get install -y zstd

After installing zstd, try installing the .deb package again:

bash
sudo apt install ./package.deb

This works if your dpkg version already has zstd support compiled in.

3Upgrade dpkg (Recommended for newer systems)

If installing zstd alone doesn't work, upgrade dpkg to a version with native zstd support:

bash
sudo apt-get update
sudo apt-get install --only-upgrade dpkg

Then try installing the package again. This is the most reliable solution if your Debian version can provide dpkg 1.21.0 or later.

4Repackage the .deb with compatible compression (Workaround)

If upgrading dpkg is not an option, extract and repackage the .deb with gzip compression:

bash
# Extract the original package
dpkg-deb -x package.deb tmp
dpkg-deb -e package.deb tmp/DEBIAN

# Repackage with gzip compression
dpkg-deb -Zgzip -b tmp package-repackaged.deb

Then install the repackaged version:

bash
sudo apt install ./package-repackaged.deb

This converts the internal compression from zstd to gzip, making it compatible with older dpkg versions.

Advanced notes

Zstandard (zstd) compression became the default in Ubuntu 21.10 and offers better compression ratios and speed than xz or gzip. However, this creates a compatibility gap for systems still running older dpkg versions. If you are building Debian packages for distribution to systems that might have older dpkg, consider using the -Zgzip flag with dpkg-deb to ensure compatibility. For Raspberry Pi users, check if raspbian/Debian repositories have updated versions available—sometimes package maintainers release fixed versions with compatible compression after reports are filed.

Frequently asked questions

What does "dpkg: error: archive 'filename.deb' uses unknown compression" mean?
deb file, dpkg inspects the archive structure to extract the control and data tarballs. 10+) default to zstd compression for these internal archives. 0) only support gzip and xz compression, so they fail with an "unknown compression" error when encountering zstd-compressed members.
How do I fix "dpkg: error: archive 'filename.deb' uses unknown compression"?
This error occurs when installing .deb packages that use zstd (Zstandard) compression on systems with older dpkg versions that don't support it. Common on Debian 11 and Raspberry Pi systems trying to install newer packages. Fix by upgrading dpkg, installing zstd, or repackaging the .deb file.
What causes "dpkg: error: archive 'filename.deb' uses unknown compression"?
Package was built on Ubuntu 21.10+ or Debian 12+ (which default to zstd compression) Target system is running Debian 11 (Bullseye) or older with dpkg version 1.20.9 or earlier dpkg version on the target system does not include zstd support (needs 1.21.0+)
Is the "dpkg: error: archive 'filename.deb' uses unknown compression" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading