How to fix dpkg-deb: error: archive 'filename.deb' has premature member 'control.tar.xz' in APT
This error occurs when your system's dpkg version is too old to handle .deb packages compressed with xz. Update dpkg to resolve the compatibility issue.
Quick fix
Fixes dpkg-deb: error: archive 'filename.deb' has premature member 'control.tar.xz'
sudo apt-get clean
sudo apt-get update
sudo apt-get install dpkg- Update dpkg to the latest version
- Clear and refresh package cache
- Retry the installation
sudo apt-get cleansudo apt-get updatesudo apt-get install dpkgdpkg-deb: error: archive 'filename.deb' has premature member 'control.tar.xz'
What this error means
The dpkg package manager on your system cannot recognize or decompress the xz-compressed control.tar.xz file inside the .deb package. This is a version compatibility issue: newer packages use xz compression for the control archive, but older dpkg versions only support gzip compression (control.tar.gz). When dpkg encounters the xz-compressed member, it fails because it expects the traditional gzip format.
Typical symptoms
- dpkg-deb error appears when running apt-get install or dpkg -i
- Installation fails with "has premature member" message mentioning control.tar.xz
- Update Manager shows available updates but cannot apply them
- Package installation fails silently or abruptly
Common causes
- Your dpkg version is outdated and does not support xz compression in control archives
- Using an old Linux distribution (Ubuntu 14.04 Trusty or Linux Mint 17.x) with unpatched dpkg
- Repository mirrors or packages built with newer dpkg versions incompatible with your system
- Incomplete or interrupted dpkg upgrade that left the package manager in an inconsistent state
How to fix "dpkg-deb: error: archive 'filename.deb' has premature member 'control.tar.xz'"
Run the following commands to update your dpkg package:
sudo apt-get clean
sudo apt-get update
sudo apt-get install dpkgThis will upgrade dpkg to a version that supports xz-compressed control.tar.xz files. The fix was backported to Ubuntu 14.04 (Trusty) in dpkg version 1.17.5ubuntu5.8 and later.
After updating dpkg, ensure your package cache is clean and up to date:
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get updateThis removes cached packages and ensures you have the latest package metadata from your repositories.
Now attempt to install or upgrade the package that was failing:
sudo apt-get install <package-name>Or to upgrade all packages:
sudo apt-get upgradeThe updated dpkg should now be able to handle xz-compressed .deb files without errors.
Advanced notes
If you are building .deb packages and need to support older systems, you can control the compression format using dpkg-deb options. Use dpkg-deb --build -Zgzip to create control.tar.gz instead of control.tar.xz, or use sbt-native-packager with debianNativeBuildOptions in Debian := Seq("-Zgzip", "-z3"). The --uniform-compression and --no-uniform-compression flags also affect which compression format is used. For legacy Ubuntu 14.04 (Trusty) systems, consider upgrading to a modern LTS release (20.04 or 22.04) as Trusty reached end-of-life and only receives Extended Security Maintenance updates.
Frequently asked questions
- What does "dpkg-deb: error: archive 'filename.deb' has premature member 'control." mean?
- deb package. gz). When dpkg encounters the xz-compressed member, it fails because it expects the traditional gzip format.
- How do I fix "dpkg-deb: error: archive 'filename.deb' has premature member 'control."?
- This error occurs when your system's dpkg version is too old to handle .deb packages compressed with xz. Update dpkg to resolve the compatibility issue.
- What causes "dpkg-deb: error: archive 'filename.deb' has premature member 'control."?
- Your dpkg version is outdated and does not support xz compression in control archives Using an old Linux distribution (Ubuntu 14.04 Trusty or Linux Mint 17.x) with unpatched dpkg Repository mirrors or packages built with newer dpkg versions incompatible with your system
- Is the "dpkg-deb: error: archive 'filename.deb' has premature member 'control." error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐APT Official Documentation
- ๐Travis CI Issue #9361(GitHub)
- ๐sbt-native-packager Issue #1067(GitHub)