Convert Red Hat Packages To Debian In Linux Using This Tool

To convert rpm packages (packages from Red Hat/ Fedora) into deb packages (Debian packages) so that they can be installed in any Debian based distro, alien is a command-line tool that can be used.

Installing it is simple, open the Terminal and type:

sudo apt install alien

installing alien in linux mint

After it is installed, you can directly use it from the Terminal.

The general syntax for using alien is:

sudo alien targetpackagetype sourcepackagepath

Converting rpm packages to deb:

So, to convert an existing rpm package to deb, the command is :

sudo alien --to-deb sourcerpmpackage

convert rpm packages to deb using alien

Alternatively, use the -d parameter to do the same

sudo alien -d sourcerpmpackage

Wait for the process to finish. The rpm package will now be available as a deb package which can then be installed using the dpkg command (in Linux Mint for this example):

sudo dpkg -i debpackagename

install deb packages using dpkg

The package will be installed and ready to use.

 package installed after converting it to deb from rpm using alien

Also, if you’d like to directly install the converted deb package after converting it from rpm, use the -i switch with alien:

sudo alien -i --to-deb sourcerpmpackage

automatically install converted packages in alien

It will then automatically be installed after converting it from rpm.

Other than that, alien can also be used to convert packages to rpm, tgz and so on.

Converting rpm packages to other formats:

To convert a rpm package to tgz (Slackware), use the –to-tgz or -t parameter:

sudo alien --to-tgz sourcepackagepath

convert rpm packages to tgz using alien

So you can convert packages that can then be installed in different Linux distros.

rpm packages converted to deb and tgz using alien

Use the following parameters for converting packages to various formats using alien:

various package conversion parameters between distros when using alien

You can also get a list of additional options by using the manual page:

man alien

alien man page

This is a useful Linux command-line tool that you can use to convert and use packages from different Linux distros. It is however not recommended for converting system packages to ensure stability. Also, if you already have native packages directly available for a distro, install and use them instead.

Happy converting.

Comments are closed.