How to Install RPM Fusion on Rocky Linux EL9 or EL8

RPM Fusion is a valuable repository that complements the standard Rocky Linux repositories by offering various extra packages. These additional packages often include essential multimedia codecs, proprietary drivers, and other software not found in the default repositories. If you’re interested in learning how to install RPM Fusion on Rocky Linux 9 or the older enterprise stable release of Rocky Linux 8, this guide is for you.

Why RPM Fusion is Important for Rocky Linux Users

  • Broader Software Options: RPM Fusion expands your software choices, enhancing your Rocky Linux system’s capabilities.
  • Simplified Installation: The repository makes it easy to install complex software packages, often with just a single command.
  • High-Quality Packages: RPM Fusion ensures that the packages are well-maintained and regularly updated, providing a stable and secure user experience.
  • Seamless Compatibility: Designed to integrate smoothly with Rocky Linux, RPM Fusion is a reliable addition to your system.

In the following sections, we will provide a detailed guide on how to install RPM Fusion on Rocky Linux. The guide will include step-by-step instructions for Rocky Linux 9 and the older enterprise stable release of Rocky Linux 8, using the command line terminal for installation.

Step 1: Update Rocky Linux Before RPM Fusion Installation

Before continuing, please ensure all existing software is updated on Rocky Linux to avoid any potential issues during the installation and ensure good system maintenance.

sudo dnf upgrade --refresh

Step 2: Import EPEL & EPEL Next Repository on Rocky Linux 9 or 8

Ensure you import the correct EPEL repository for RPM Fusion matching the Rocky Linux version you are currently using.

The first step is to install the EPEL repository, and the recommended approach is to install both repositories.

Import EPEL for Rocky Linux 9

The first step is to enable the CRB repository.

sudo dnf config-manager --set-enabled crb
sudo dnf install \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm

Import EPEL for Rocky Linux 8

sudo dnf install \
    https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
    https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-8.noarch.rpm

Step 3: Install RPM Fusion on Rocky Linux 9 or 8

RPM Fusion provides two repositories, “free” and “non-free,” with different software packages.

The “free” repository contains open-source packages licensed under a free and open-source license, such as the GPL. These packages can be freely distributed, modified, and used without restrictions. They are “free as in freedom,” not just “free of charge.”

The “non-free” repository contains packages that are not open-source or licensed under a free and open-source license. These packages may be distributed, modified, and used under certain conditions but not freely distributed or modified. Examples of packages in the non-free repository include proprietary drivers and multimedia codecs.

Notably, packages in the non-free repository may be under a more permissive license than commercial software. Still, they are not considered free software by the Free Software Foundation.

Install RPM Fusion Free Repository.

sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y

Install RPM Fusion Non-Free Repository.

sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm -y

Next, verify the installation with the following command:

dnf repolist | grep rpmfusion

Example output:

rpmfusion-free-updates    RPM Fusion for EL 9 - Free - Updates
rpmfusion-nonfree-updates RPM Fusion for EL 9 - Nonfree - Updates

Step 4: Enable RPM Fusion Testing Updates on Rocky Linux 9 or 8

Enabling the RPM Fusion testing branch allows you to receive the latest software versions, if available in the testing repository, before making their way to the stable branch. Use with caution, just like any testing branch.

Enable the Free Testing Updates Repository on Rocky Linux 9 or 8

sudo dnf config-manager --set-enabled rpmfusion-free-updates-testing

Enable the Non-Free Testing Updates Repository on Rocky Linux 9 or 8

sudo dnf config-manager --set-enabled rpmfusion-nonfree-updates-testing

Check to see if the testing RPM fusions have been added.

dnf repolist | grep rpmfusion

Example output:

rpmfusion-free-updates            RPM Fusion for EL 9 - Free - Updates
rpmfusion-free-updates-testing    RPM Fusion for EL 9 - Free - Test Updates
rpmfusion-nonfree-updates         RPM Fusion for EL 9 - Nonfree - Updates
rpmfusion-nonfree-updates-testing RPM Fusion for EL 9 - Nonfree - Test Updates

Step 5: RPM Fusion Command Examples on Rocky Linux 9 or 8

First, list what is available in the RPM Fusion repositories you imported.

List all Packages

dnf --enablerepo=rpmfusion-* list available | grep rpm fusion | more

Additionally, installing the dnf-utilities package can yield better results.

sudo dnf install dnf-utils -y

Then, use the repo query command. The example will continue to use Discord.

sudo repoquery -i VirtualBox
Screenshot showing example repoquery command output for VirtualBox package from RPM Fusion on Rocky Linux 9 or 8.
Screenshot demonstrating how to use repoquery to find VirtualBox package details in RPM Fusion on Rocky Linux.

As you can see, the VirtualBox package is coming from the RPM Fusion Free repository.

Install RPM Fusion AppStream Meta Data on Rocky Linux

The RPM Fusion repository provides packages for GNOME and KDE Discover.

sudo dnf groupupdate core

Install RPM Fusion Multimedia on Rocky Linux

RPM Fusion repositories provide packages and updates to play multimedia files and GStreamer compatibility.

Install multimedia packages for GStreamer Enabled Applications on Rocky Linux:

sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin

Install sound and video packages required by some applications on Rocky Linux:

sudo dnf groupupdate sound-and-video

Step 5: Tainted RPM Fusion Repositories on Rocky Linux 9 or 8

RPM Fusion has what is known as “tainted” repositories for free and non-free. To sum up, these repositories contain illegal software in certain countries due to licensing.

Install Taint RPM Fusion Free support (For Floss Packages) on Rocky Linux

sudo dnf install rpmfusion-free-release-tainted

Install Taint RPM Fusion Non-Free support (For Non-Floss Packages) on Rocky Linux

sudo dnf install rpmfusion-nonfree-release-tainted

Example of installing additional tainted proprietary support packages.

sudo dnf install \*-firmware

Once done, use the grep command to check the dnf repolist of all the installed RPM Fusions.

dnf repolist | grep rpmfusion
Screenshot displaying dnf repolist command output, showing RPM Fusion repositories, including nonfree and tainted, installed on Rocky Linux 9 or 8.
Screenshot illustrating the output of the dnf repolist command, confirming the successful installation of RPM Fusion repositories on Rocky Linux.

As mentioned above, you can see that the tutorial has all repositories of RPM Fusion enabled; ideally, you would only have the standard installed for most situations.

Step 6 How to Disable RPM Fusion Testing Updates on Rocky Linux 9 or 8

If you no longer require the RPM fusion testing repository, you can disable it by using one of the following commands that match the repository you enabled.

Disable the Free Testing Updates Repository on Rocky Linux

sudo dnf config-manager --set-disabled rpmfusion-free-updates-testing

Disable the Non-Free Testing Updates Repository on Rocky Linux

sudo dnf config-manager --set-disabled rpmfusion-nonfree-updates-testing

Step 7 How to Remove (Uninstall) RPM Fusion on Rocky Linux 9 or 8

Removing the repositories from your system is relatively easy. To remove repositories, you need to find the name and use the dnf remove command, but first, make sure to have the full name. This can be done using the following command.

Remove the Free Repository on Rocky Linux

sudo dnf remove rpmfusion-free-release -y

Remove the Non-Free Repository on Rocky Linux

sudo dnf remove rpmfusion-nonfree-release -y

Remove the Free (Tainted) Repository on Rocky Linux

sudo dnf remove rpmfusion-free-release-tainted -y

Remove the Non-Free (Tainted) Repository on Rocky Linux

sudo dnf remove rpmfusion-nonfree-release-tainted -y

To re-install the Fusion drive, repeat the process at the start of the tutorial.

Conclusion

There are a few reputable package repositories that you can use on RHEL-based distributions, and one of the most well-respected is RPM Fusion. It’s easy to set up and use, giving you access to many software unavailable in the default repositories.

To search the RPM Fusion repository database for packages, visit here.

Leave a Comment