Convert .rpm to .deb package in Ubuntu

In this article, we would cover how to convert .rpm to .deb package in Ubuntu. We already have a standard Ubuntu repository to install packages. Apart from that, if certain packages aren’t available then we can easily install packages from trusted external sources through various methods. As most developers provide a .deb package or something else as an alternative so that we can have the package.

But, for some reason and despite going through the hardship of not finding the relevant package file anywhere we may opt to install it through .rpm file format. The command-line utility which assists us in the process is – alien.

So, we first see how to install the package and then what needs to be done to get the required outcome.

Note: Following operations would require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.

Install alien in Ubuntu

Since the package – alien is already available through standard Ubuntu repository. Therefore, we need to update the repository first. This ensures we get to have the latest version of the package. Hence, open a terminal and issue the following –

sudo apt update

Next, to install alien

sudo apt install alien

Convert .rpm to .deb package in Ubuntu

Following syntax is to be used if we intend to convert .rpm to .deb in Ubuntu –

sudo alien --to-deb /path/to/.rpm-file

Word of caution: It is not advisable to install any packages which can hamper the smooth functioning of the system. Also, make sure that you don’t install any system specific packages through this method. It may render the system unusable. Furthermore, we need to take extreme caution to ensure that the package which we convert and later install is compatible with our System Architecture among other things.

In conclusion, we have covered how to convert .rpm to .deb package in Ubuntu here.

Additional Info

Follow the links here to see how to Install or Remove a package in Ubuntu.

Just as we can convert .rpm to .deb package with alien. We can also convert .deb to .rpm package using the same command-line utility. Use the following as reference while converting .deb to .rpm package file –

sudo alien --to-rpm /path/to/.deb-file