What an RPM file is and when you need to install one
An RPM file is a package that contains software and instructions for installing it on Linux systems that use Red Hat, CentOS, Fedora, or similar distributions. RPM stands for Red Hat Package Manager. When you download an RPM file, you are getting a compressed bundle that your system can unpack and set up automatically — rather than downloading source code and compiling it yourself.
You will encounter RPM files when downloading software directly from a vendor's website, or when a piece of software is not available through your system's standard package repository. For example, some proprietary applications, newer versions of software, or niche tools are distributed as RPM files rather than through the official channels your system normally uses.
The most common way to install an RPM file is through the command line using either rpm or dnf (the newer package manager on Fedora and recent CentOS systems). Both tools handle the installation, but they work differently — dnf is generally easier because it automatically finds and installs dependencies, while rpm requires you to handle missing pieces yourself.
Key Takeaways
- RPM files are software packages for Red Hat-based Linux systems; you install them from the command line using rpm or dnf commands.
- Use dnf install to install an RPM file if your system has dnf, because it automatically finds and installs any required dependencies.
- Use rpm -i to install with the older rpm tool, but you may need to manually install missing dependencies first.
- Always verify the RPM file came from a trusted source before installing, since RPM files run with system-level permissions.
- If installation fails due to missing dependencies, dnf can often resolve them automatically, while rpm will show you what is missing.
Installing an RPM file with dnf (the modern approach)
If your system has dnf installed — which is the default on Fedora 22 and later, and on CentOS 8 and later — use it to install RPM files. Open a terminal and navigate to the folder where your RPM file is located, or provide the full path to the file. Then run this command:
dnf install ./filename.rpm
Replace "filename.rpm" with the actual name of your file. The ./ at the beginning tells dnf to look in the current folder. If the RPM file is in your Downloads folder and you are in your home directory, you would type: dnf install ./Downloads/filename.rpm
The dnf tool will check whether the software requires other packages to run (called dependencies), download them from your system's repositories if needed, and install everything together. It will show you a list of what it plans to install and ask for confirmation. Type y and press Enter to proceed. If dnf cannot find a required dependency in your repositories, it will tell you which package is missing, and you can then search for that package separately or contact the software vendor.
Installing an RPM file with rpm (the traditional method)
If your system uses the older rpm tool instead of dnf, or if you prefer to use it directly, the command is:
rpm -i ./filename.rpm
The -i flag stands for "install". Like dnf, you can provide the full path to the file or navigate to its folder first. The rpm tool will unpack and install the software, but it will not automatically fetch dependencies. If the software requires other packages, rpm will stop and tell you which ones are missing. You then need to install those dependencies first using either rpm or dnf before trying again.
A useful variation is rpm -ivh ./filename.rpm, where the additional flags show you progress as the installation runs. The v means verbose (show details), and h means print a hash mark progress bar. This is helpful when installing large files and you want to see that something is actually happening.
Handling missing dependencies
When you install an RPM file with rpm and it fails because of missing dependencies, the error message will list the packages it needs. Write down those package names exactly as shown. Then install each one using dnf (if available on your system) or rpm, depending on whether those packages are in your repositories.
For example, if rpm tells you it needs "libssl.so.1.1", you would search for the package that provides it. On most systems, you can use dnf search libssl to find candidate packages, then install the one that matches. Once all dependencies are installed, run the original rpm install command again.
If you used dnf to install the original RPM file, it handles this automatically — it finds the missing packages in your repositories and installs them without asking you to track them down. This is why dnf is the easier choice for most users, even though rpm gives you more direct control.
Verifying the RPM file before installation
RPM files run with system-level permissions, so you should verify that the file came from a trusted source before installing it. Check the website or vendor where you downloaded it to confirm the download link is legitimate. If the vendor provides a checksum (a long string of letters and numbers), you can verify that your downloaded file matches it.
To check a file's checksum, open a terminal in the folder where the RPM file is located and run sha256sum filename.rpm. Compare the output to the checksum the vendor provided. If they match, the file has not been altered or corrupted. If they do not match, do not install the file — delete it and download again from the vendor's official website.
Some vendors also sign their RPM files with a GPG key, which is a cryptographic signature that proves the file came from them. Your system can verify this signature automatically. If you are unsure whether an RPM file is safe, contact the vendor or check their documentation for instructions on verifying their packages.
Upgrading or removing an installed RPM package
If you have already installed a package and want to upgrade it to a newer version, use dnf upgrade ./filename.rpm or rpm -U ./filename.rpm. The -U flag means upgrade. This replaces the old version with the new one while keeping your configuration files intact.
To remove a package you no longer need, use dnf remove packagename or rpm -e packagename. Note that you use the package name here, not the filename — for example, if you installed "firefox-115.0-1.fc38.x86_64.rpm", you would remove it with dnf remove firefox. The system knows which version you have installed and removes it.
Troubleshooting common installation problems
If you see a permission denied error, you need to run the command with administrator privileges. Add sudo before the command: sudo dnf install ./filename.rpm or sudo rpm -i ./filename.rpm. You will be asked for your password. If your user account is not in the sudoers group, you will not be able to install software — contact your system administrator.
If the installation appears to hang or freeze, wait a few minutes before interrupting it. Large packages can take time to unpack and install, especially on slower systems. If it truly seems stuck, press Ctrl+C to cancel, then try again. If the same file fails repeatedly, the RPM file itself may be corrupted — try downloading it again from the vendor.
If you see an error about architecture mismatch (for example, "package is for x86_64 but you are on i686"), the RPM file is built for a different processor type than your system. Check the vendor's website to confirm you downloaded the correct version for your system. You can find your system's architecture by running uname -m in a terminal.
Frequently Asked Questions
What is the difference between rpm and dnf?
rpm is the low-level tool that actually installs packages, but it does not automatically find dependencies. dnf is a higher-level tool that uses rpm behind the scenes but adds dependency resolution — it finds and installs required packages for you. dnf is easier for most users; rpm gives you more control but requires more manual work.
Can I install an RPM file on Ubuntu or Debian?
No. Ubuntu and Debian use .deb packages, not RPM files. They have different package formats and package managers. If you need software that is only available as an RPM, you would need to either find a .deb version, compile from source, or use a compatibility layer like Alien (which converts RPM to deb, though results are not always reliable).
Do I need to be connected to the internet to install an RPM file?
You need internet only if the RPM file has dependencies that are not already installed on your system and those dependencies are not included in the RPM file itself. If all dependencies are already present, or if the RPM is self-contained, installation works offline. dnf will tell you if it needs to download additional packages.
What does it mean if rpm says a package is already installed?
It means a version of that software is already on your system. If you want to upgrade to a newer version, use the upgrade command (rpm -U or dnf upgrade) instead of install. If you want to replace it with a different version, you may need to remove the old one first, depending on version compatibility.
Can I install an RPM file by double-clicking it?
On some desktop Linux systems with a graphical package manager installed, yes — double-clicking an RPM file may open a GUI installer. However, the command line method is more reliable and works on all systems. If the GUI method fails or is not available, the command line approach will work.