What is the Difference between DEB and RPM? (Linux)


Linux is complicated for different reasons. But even when you think you know Linux, switching from a distribution to another can also bring many changes, like the one concerning the package manager.

DEB and RPM are two files used by package managers on Linux operating systems. The main difference is that DEB can only be used on Debian-based distributions while RPM are for distributions based on Red Hat.

In this article, we’ll discuss in detail about DEB and RPM to see the exact differences between them.

DEB packages

Definition

deb is the format, as well as extension of the software package format for the GNU/Linux distribution Debian and its derivatives.

Wikipedia

In short, to install a new application on Debian, you’ll need a deb file, one way or another. If you use a graphical tool or the apt command it might be hidden, but in the background, that’s always a deb file that will be downloaded and installed.

A deb file is an archive containing all the files needed to install the desired software.

Which Linux distributions use DEB packages?

As explain in this article, Linux is the kernel of many different systems, named distributions. Debian is one popular distribution, but it’s not the only one.

Debian and all distributions based on it are using DEB packages to install new software. It includes well-known distributions like Ubuntu, Linux Mint or Kali Linux but also many others.

How to install DEB packages?

As I already told you, DEB packages are most of the time installed in the background via tools like apt or a graphical equivalent. But it’s also possible to download an install them manually.

For example, if you download the Opera web browser on the official website, you’ll get a deb file named something like:
opera-stable_77.0.4054.64_amd64.deb

Once downloaded you can install it with this command:
sudo dpkg -i opera-stable_77.0.4054.64_amd64.deb

The -i option stands for “install”.
A package file might have some dependencies to work correctly, in this case you need to install them first.

RPM packages

Definition

RPM stands for Red Hat Package Manager. It’s a file format that can be use by the package manager on Red Hat systems to install a new software on a computer. Basically, it’s an archive file containing everything needed to install the corresponding application.

Which Linux distributions use RPM packages?

All distributions based on Red Hat use RPM packages to install new applications. For example, Fedora, CentOS and OpenSuse can read and install RPM packages natively.

How to install RPM packages?

Red Hat-based systems comes with the RPM package manager tool, that can be used to install new RPM packages.
The corresponding command line is:
rpm -ivh <package_name>

Options are:

  • i: Install a new package
  • v: Print verbose information
  • h: Better display for the verbose information

Differences between DEB and RPM

Usage

From a user point of view, there is no big difference between DEB and RPM. In both cases they are the files needed to install a new application on their system.

Distributions

Even if DEB and RPM are not different for the end user, they don’t work on the same operating systems.
Linux distributions based on Debian can install DEB files while distributions based on Red HAT can only install RPM packages.

Convert RPM to DEB

As there is no big technical difference between RPM and DEB, it’s possible to convert one format to another by using the alien command line.

So, the first step is to install alien:
sudo apt install alien

The, you can use the alien command to convert an rpm file to a deb package:
alien <package-name>.rpm

Convert DEB to RPM

The “alien” tool can be used the same way to convert a deb file to a rpm package:
alien -r <package-name>.deb

Once done, you can use the commands given previously to install them on your system.

Patrick FROMAGET

I am very curious and I love to learn about all types of subjects. Thanks to my experience on the web, I share my discoveries with you on this site :)

Recent Posts