Loading...

March 13, 2013 1,304 views

Convert Linux distribution packages

Converting Linux packages using alien program

Converting linux packages can be really hard. Luckily there is a program called alien that can convert most of the common Linux distribution packages.

Especially inexperienced Linux users sometimes face a rather difficult situation. They have for example a program in a Red Hat RPM package but need a Debian DEB package. When the original developer of the program does not exist, or does not provide their program for different Linux distribution it can quickly lead to a dead end. Luckily, there is a converter that can help you convert some Linux distribution packages between each other - alien.

alien is an experimental software that is able to convert various Linux distribution package (Red Hat RPM, Debian DEB, Stampede SLP, Slackware TGZ, and Solaris PKG) between each other. Although many users use this program for years, it is still far from complete and has many bugs and limitations. It is, however your best bet if you want to convert some non-system critical Linux packages.

Install alien program

First thing you need to do is to install the alien program. You can do it easily via the terminal.

sudo apt-get install alien

Then, if you launch alien you will see the following command options.

alien program started in Ubuntu terminal

alien launched in Ubuntu terminal

How to convert DEB to RPM

You can use alien to convert DEB package to RPM, in order to do so use the following example for your needs.

sudo alien -r yourpackage.deb

This will create a RPM package from your DEB file.

How to convert RPM to DEB

Same way you can use alien to convert RPM package to DEB.

sudo alien -d yourpackage.rpm

The opposite conversion that will create DEB package from your RPM file.

How to convert other Linux distribution packages

Much like in previous examples, alien can be used for other conversion types. Except for the previously mention DEB and RPM packages, it can also convert Stampede SLP, Slackware TGZ, or Solaris PKG packages.

Still having trouble converting Linux package

This article just covers the basics of alien program usage. Should you need more specific information, please check the alien developer website or Ubuntu help sites where you can find them. Also, you should generally avoid trying to convert system-critical files as they might end corrupted after the conversion.