Software packages for Linux generally come in two main formats: Debian packages (.deb) for systems like Ubuntu and RPM packages for Red Hat-based systems. You might encounter a situation where a specific driver or proprietary tool is only distributed as an RPM file, leaving you unable to use the standard apt install command. Without a way to bridge this gap, you cannot access critical software required for your project.
Ubuntu does not support RPM files natively, as its core package management system is built around the Advanced Package Tool (APT) and dpkg. This guide explains two effective methods to handle RPM files on Ubuntu: converting them into the native Debian format using the Alien tool or installing a standalone RPM manager. Mastering these approaches allows you to expand your software library while maintaining system stability.
Table of Contents
Key Takeaways: Managing RPM on Ubuntu
- Alien Tool → The most reliable way to handle RPMs by converting them into .deb files before installation.
- Package Compatibility → RPM files are designed for different library versions; always check file size in Linux and dependencies before proceeding.
- Sudo Privileges → You must understand the Linux sudo command to install the necessary conversion utilities.
- Dependency Management → Unlike native packages, converted RPMs may require you to manually resolve missing shared libraries.
Method 1: Using the Alien Tool (Recommended)
Alien is a program that converts between different Linux package formats. It is the safest way to install an RPM on Ubuntu because it creates a standard Debian package that the system can track.
1. Install Alien: First, update your repositories and install the utility: sudo apt update && sudo apt install alien -y
2. Convert and Install: You can convert and install the package in one step using the -i flag: sudo alien -i your-package.rpm
Expected Output:
your-package.deb generated
Checking for conflicts...
Installing your-package.deb...
Selecting previously unselected package your-package.
Method 2: Installing the RPM Package Manager Directly
If you prefer to manage RPMs using native Red Hat commands, you can install the rpm utility itself on Ubuntu. However, this method will not automatically resolve dependencies.
1. Install the RPM utility: sudo apt install rpm
2. Install the file: sudo rpm -i --force-debian your-package.rpm
Warning: This method bypasses the Ubuntu package database, which can lead to system conflicts if the package tries to overwrite essential Ubuntu files.
See also: Mastering the Linux Command Line — Your Complete Free Training Guide
Step-by-Step Process: Converting RPM to DEB
Follow these steps to safely convert an RPM file into a Debian package for permanent use on your system:
- Open your terminal and navigate to the directory containing the RPM file.
- Verify the package name and version to ensure it matches your hardware architecture (e.g., x86_64).
- Run the conversion command:
sudo alien your-package.rpm. - Confirm the .deb creation: Look for the newly generated
.debfile in your current folder. - Install the converted file: Use
sudo dpkg -i your-package.deb. - Fix missing dependencies: If the installation errors out, run
sudo apt install -fto fetch required libraries.
Summary Tables
| Method | Tool Used | Best Use Case | Risk Level |
|---|---|---|---|
| Conversion | Alien | General software and drivers | Low |
| Direct Install | RPM Command | Specialized legacy tools | High |
| Manual Extract | cpio | Inspecting file contents | None |
| Alien Flag | Purpose |
|---|---|
| -d | Generate a Debian (.deb) package (default). |
| -i | Automatically install the package after conversion. |
| -r | Convert a Debian package back to RPM. |
| -k | Keep the version number from the original RPM. |
FAQs
Will every RPM work on Ubuntu after conversion? No. While the format changes, the software inside still expects specific system libraries. If the RPM was built for a very old version of CentOS, it might not run on a modern Ubuntu LTS.
How do I uninstall an RPM I installed with Alien? Because Alien creates a .deb file, you can remove it like any other Ubuntu package: sudo apt remove package-name.
Why should I use sudo for these commands? Installing software modifies system-level directories like /usr/bin and /etc. These areas are protected to ensure Linux server security.


