How to fix dpkg-deb: error: failed to read archive in APT

APTINTERMEDIATEHIGHUpdated May 9, 2026ยท 635 views

The "failed to read archive" error occurs when dpkg-deb cannot parse a .deb package file, usually due to corruption, an incomplete download, or an unsupported compression format. This guide covers diagnosis and repair strategies.

Quick fix

Fixes dpkg-deb: error: failed to read archive

rm ~/path/to/package.deb
wget https://example.com/package.deb
  1. Re-download the package
  2. Clear the apt cache
  3. Update dpkg to the latest version
  4. Reconfigure the dpkg database
apt โ€” error
rm ~/path/to/package.deb
wget https://example.com/package.deb
dpkg-deb: error: failed to read archive

What this error means

When dpkg-deb encounters a .deb archive that does not conform to the Debian package format, it cannot extract the control files and payload. This error means the file header is invalid, the file is corrupted, or the compression method is not supported by your dpkg version. The dpkg package manager relies on these archives to install software, so a malformed archive blocks installation entirely.

Typical symptoms

  • Package installation fails with "dpkg-deb: error: failed to read archive" message
  • apt install or dpkg -i commands cannot proceed
  • The error appears when installing .deb files downloaded from the internet
  • System cannot complete package configuration during installation

Common causes

  1. Corrupted or incomplete .deb file download due to network interruption
  2. Outdated dpkg version that does not support newer compression formats (e.g., zstd)
  3. File is not actually a valid Debian package despite .deb extension
  4. Disk I/O errors or hardware issues corrupting the file
  5. Cached corrupted package in /var/cache/apt/archives/
  6. Interrupted installation process leaving partial or invalid files

How to fix "dpkg-deb: error: failed to read archive"

1Re-download the package

The most common cause is a failed or corrupted download. Remove the problematic file and download it again from the official repository or source:

bash
rm ~/path/to/package.deb
wget https://example.com/package.deb

Verify the file is not empty or truncated:

bash
file package.deb

A valid .deb file should show as "Debian binary package".

2Clear the apt cache

If the package was downloaded via apt, cached corrupted versions may persist. Clear the entire cache:

bash
sudo apt clean

Or remove only the problematic package:

bash
sudo rm /var/cache/apt/archives/package-name*.deb

Then retry the installation.

3Update dpkg to the latest version

Older dpkg versions do not support modern compression formats. Update to ensure compatibility:

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

If you are blocked from apt, download dpkg manually from your distribution's repository and install with: sudo dpkg -i dpkg*.deb

4Reconfigure the dpkg database

If the installation was interrupted mid-way, the dpkg database may be in an inconsistent state. Reconfigure all packages:

bash
sudo dpkg --configure -a

This command tells dpkg to finish configuring any partially installed packages.

5Fix broken dependencies

After reconfiguring, resolve any lingering dependency issues:

bash
sudo apt install -f

This command installs or removes packages to satisfy dependencies.

6Check disk health

If the error persists across multiple packages, your storage device may have hardware issues. Check system logs for I/O errors:

bash
sudo dmesg | tail -20

Look for messages about read/write errors or timeout. If found, run a file system check on the next reboot:

bash
sudo fsck -n /dev/sdX

(Replace sdX with your device; use -n to preview without making changes)

7Force package installation (advanced)

As a last resort, if you are certain the package is safe, attempt installation with the --force-overwrite flag:

bash
sudo dpkg -i --force-overwrite package.deb

Use this only if you trust the package source and have no other options.

Advanced notes

For advanced users: if dpkg-deb shows specific errors like "archive uses unknown compression for member 'control.tar.zst'", this indicates your dpkg version is too old to handle zstd-compressed packages. Ensure you are on the latest stable release of your distribution. On systems where apt itself is broken, you may need to manually download and install dpkg first, then proceed with other packages. For developers creating .deb packages, ensure the archive structure is correct: control.tar.{gz,xz,zst} must precede data.tar.{gz,xz,zst}, and both must be preceded by the debian-binary file.

Frequently asked questions

What does "dpkg-deb: error: failed to read archive" mean?
deb archive that does not conform to the Debian package format, it cannot extract the control files and payload. This error means the file header is invalid, the file is corrupted, or the compression method is not supported by your dpkg version. The dpkg package manager relies on these archives to install software, so a malformed archive blocks installation entirely.
How do I fix "dpkg-deb: error: failed to read archive"?
The "failed to read archive" error occurs when dpkg-deb cannot parse a .deb package file, usually due to corruption, an incomplete download, or an unsupported compression format. This guide covers diagnosis and repair strategies.
What causes "dpkg-deb: error: failed to read archive"?
Corrupted or incomplete .deb file download due to network interruption Outdated dpkg version that does not support newer compression formats (e.g., zstd) File is not actually a valid Debian package despite .deb extension
Is the "dpkg-deb: error: failed to read archive" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading