DEB, RPM, PKG,… there are several package formats depending on the Linux operating system: Debian, Fedora, Arch Linux, etc. and in this tutorial I will show you a couple of tools to convert from one package format to another.

Table of Contents

Alien

This program can convert between rpm, deb, tgz (Slackware) and slp (Stampede) packages. Available, among others, in the repositories of Debian, Alpine and Fedora. The syntax is like this:

alien [--to-deb] [--to-rpm] [--to-tgz] [--to-slp] [options] file [...]

alien should not be used to replace important system packages, like init, libc, or other things that are essential for the functioning of your system. To convert to and/or from a format, some packages must be installed (check alien man page for more info). For example, for converting to (but not from) deb format, the gcc, make, debhelper, dpkg-dev, and dpkg packages must be installed.

alien will convert all the files you pass into it into all the output types you specify. By default, alien converts to DEB.

Debtap

debtap converts .deb packages to Arch Linux packages. Available on AUR (AUR has a lot of packages, search for a package there before trying to convert it). Do not use it to convert packages that already exist on official repositories or can be built from AUR. After installed, run debtap -u to update the database. The syntax for converting a package is this one:

debtap [options] package_filename

You’ll need the following dependencies to run debtap: bash, binutils, pkgfile and fakeroot. In case you need to write a new PKGBUILD for a package that already exists in the Debian/Ubuntu distributions, using parameter -p or -P it can generate a PKGBUILD and then edit it as you wish. Run debtap -h for more info on available parameters.

arch2appimage

As you can guess, this Python script converts an Arch Linux package (from official repositories or AUR) to an AppImage. To install it, just clone the repo (git clone https://github.com/hanzala123/arch2appimage.git), cd to the new folder, and install required Python modules (pip3 install -r requirements.txt). Finally, run:

python3 arch2appimage.py

Inside the program, you can type the package you want to convert and the icon file to be used.

If you have any suggestion, feel free to contact me via social media or email.