Convert tar.xz to deb

Convert TAR.XZ to DEB

Build a Debian package from TAR.XZ source with Debian tools, staging, metadata, and compatibility checks.

Convert TAR.XZ files online

We don’t have a dedicated online converter for TAR.XZ to DEB yet, but you can convert TAR.XZ files online to these formats:

Want to convert TAR.XZ to DEB?

Let us know. We pick the conversions to add next by how many people ask for them.

How to convert tar.xz to deb file

A Debian-based system may require a .deb installer when software is distributed only as a .tar.xz archive. This is usually a packaging task, not a direct format conversion, because a usable DEB needs Debian metadata, installation paths, dependencies, and sometimes maintainer scripts.

What the TAR.XZ format is

.tar.xz combines a TAR archive with XZ compression. TAR stores files and directories; XZ compresses the resulting archive. Linux and Unix projects commonly use it for source code, documentation, configuration examples, and occasionally prebuilt software.

GNU tar, XZ utilities, 7-Zip, KDE Ark, and GNOME Archive Manager can extract it. Inspect the archive before choosing a build method:

tar -tJf program.tar.xz
tar -xJf program.tar.xz -C work

A source archive may contain an existing debian/ directory, or it may be part of a Debian source package alongside files such as .dsc and debian.tar.xz. It may also contain a ready-made .deb; in that case, extract or copy that package instead of rebuilding it.

What the DEB format is

A DEB is a Debian binary package consumed by dpkg, apt, Ubuntu Software, KDE Discover, and compatible tools. Internally, it is an archive containing a control archive with package metadata and a data archive with the files installed on the system. Metadata can specify the package name, version, architecture, description, dependencies, checksums, configuration files, and maintainer scripts.

DEB packages provide package-manager installation, dependency handling, version tracking, upgrades, and removal on Debian, Ubuntu, Linux Mint, and related distributions. They are not generally interchangeable with RPM packages for Fedora or with Arch Linux packages, and a package built for one distribution release may require incompatible libraries on another.

Build a DEB from existing Debian packaging

If the extracted source contains debian/control and debian/rules, use Debian’s packaging tools rather than manually creating an archive:

sudo apt update
sudo apt install build-essential debhelper devscripts dpkg-dev
mkdir work
tar -xJf program.tar.xz -C work
cd work/program-version
sudo apt build-dep .
dpkg-buildpackage -us -uc -b

apt build-dep requires usable Debian source repositories in the APT configuration. The resulting binary package is normally placed in the parent directory. Install a local package with:

sudo apt install ../program_version_arch.deb

This lets APT resolve available dependencies; dpkg -i alone does not resolve missing dependencies. If the archive is a complete Debian source package, building from its .dsc file with dpkg-source -x may be more appropriate than extracting only the .tar.xz.

Package a project without Debian metadata

A conventional source project may use commands other than ./configure and make; follow its README, INSTALL, or build documentation. For a project that supports the conventional commands, stage its installation into a temporary directory instead of writing directly into the running system:

tar -xJf program.tar.xz
cd program-version
./configure --prefix=/usr
make
rm -rf "$PWD/pkg"
make DESTDIR="$PWD/pkg" install

Create a Debian control file inside the staged tree. Replace every example value, and use the architecture reported by the target system:

mkdir -p pkg/DEBIAN
cat > pkg/DEBIAN/control <<'EOF'
Package: program
Version: 1.0.0
Section: utils
Priority: optional
Architecture: amd64
Maintainer: Package Maintainer <maintainer@example.org>
Depends: libc6
Description: Short program description
 A longer package description uses an indented continuation line.
EOF
fakeroot dpkg-deb --build pkg program_1.0.0_amd64.deb

Use dpkg --print-architecture to identify the native architecture. Set Architecture: all only for architecture-independent content such as scripts or documentation; compiled programs need the architecture for which they were built. List all runtime library and program dependencies explicitly, because dpkg-deb cannot reliably infer them from arbitrary binaries.

FPM can automate simple directory-to-DEB packaging after staging files:

fpm -s dir -t deb -n program -v 1.0.0 -a amd64 -C pkg usr

FPM does not determine correct dependencies or Debian integration automatically. Services, desktop entries, configuration handling, triggers, copyright files, translations, and maintainer scripts may require additional packaging work.

Desktop and online tools

7-Zip, KDE Ark, and GNOME Archive Manager are suitable for viewing or extracting TAR.XZ files, but they do not convert arbitrary source files into a valid installable DEB. Use dpkg-buildpackage for a project with Debian metadata and dpkg-deb or FPM for a deliberately staged package.

An online converter is not appropriate for this conversion. A web service cannot reliably compile source code, determine runtime dependencies, preserve Unix ownership and permissions, or validate installation scripts. Online archive converters may repack bytes, but the result is not necessarily a Debian package and uploading proprietary or unreleased source creates a disclosure risk.

Check compatibility before installation

Review the generated package before installing it:

dpkg-deb --info program_1.0.0_amd64.deb
dpkg-deb --contents program_1.0.0_amd64.deb
lintian program_1.0.0_amd64.deb

Test it in a disposable Debian or Ubuntu virtual machine with the same release and architecture as the target:

sudo apt install ./program_1.0.0_amd64.deb

A package made from make install can omit system integration, upgrades, removal logic, service definitions, menu entries, permissions, and distribution-specific paths. Building from upstream Debian packaging, or from the target distribution’s source package, generally produces more accurate metadata than wrapping an arbitrary TAR.XZ installation tree.

TAR.XZ vs DEB: format comparison

How the TAR.XZ and DEB formats compare on the properties that matter most for this conversion.

Comparison of the TAR.XZ and DEB file formats
Property .TAR.XZ tar archive compressed with XZ .DEB Debian binary package
Compression Both Both
Compression ratio Very high Medium
Encryption No No
Split archives No No
Recovery record No No
Operating system support Wide Wide
Typical file size Small Small
Open standard Yes Yes
Introduced 2009 1995
Developer LZMA SDK / GNU tar ecosystem Debian Project
MIME type application/x-xz application/vnd.debian.binary-package

Information about file extensions and file types is provided by File-Extensions.org

Additional formats for
tar.xz file conversion

Reverse conversion

Convert to deb from
other formats

Share on social media:

Already downloaded

This file has already been downloaded. For your privacy it was deleted from our server right after the download, so it cannot be downloaded again. To get it once more, convert the file again.