Enable RPM Fusion Repository on Rocky Linux 9

In this tutorial, we want to teach you How To Enable RPM Fusion Repository on Rocky Linux 9.

RPM Fusion is a community-maintained, third-party software repository that provides packages that the Fedora project and Red Hat can’t ship due to legal and various other reasons as stated earlier.

RPM Fusion has two repositories namely “free” and “nonfree“. The free repository contains packages that are Open Source as defined by Fedora licensing guidelines. The nonfree repository contains redistributable packages that are not Open Source and packages that are not free for commercial purposes.

You can add both repos and use them simultaneously on your personal system. There won’t be any conflicts between the packages in the free and nonfree repos. If you’re interested in running only free packages, just add the free repo and install the nonfree repo later.

How To Enable RPM Fusion Repository on Rocky Linux 9

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Rocky Linux 9.

Install Epel Repository on Rocky Linux 9

First, you need to update your local package index with the following command:

sudo dnf update -y

Then, use the command below to enable and install the Epel repo on your server:

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

Or you use the following command to install Epel Repo instead of the above command:

sudo dnf install epel-release -y

Add RPM Fusion Repository on Rocky Linux 9

At this point, you can use the following command to enable the RPM fusion repo.

For the free repository, use the following command:

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

For the non-free repository, use the command below:

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

You can verify your RPM Fusion installation by using the following command:

dnf repolist | grep rpmfusion
Output
rpmfusion-free-updates        RPM Fusion for EL 9 - Free - Updates
rpmfusion-nonfree-updates     RPM Fusion for EL 9 - Nonfree - Updates

List Available Package in RPM Fusion Repo

At this point, you can list the available packages in the RPM fusion repo.

For free packages, use the command below:

dnf repository-packages rpmfusion-free-updates list
Output
Available Packages
VirtualBox.x86_64               6.1.40-1.el9              rpmfusion-free-updates
VirtualBox-devel.x86_64         6.1.40-1.el9              rpmfusion-free-updates
VirtualBox-kmodsrc.noarch       6.1.40-1.el9              rpmfusion-free-updates
VirtualBox-server.x86_64        6.1.40-1.el9              rpmfusion-free-updates
VirtualBox-webservice.x86_64    6.1.40-1.el9              rpmfusion-free-updates
akmod-VirtualBox.x86_64         6.1.40-1.el9              rpmfusion-free-updates
buildsys-build-rpmfusion.x86_64 11:35-0.4.el9             rpmfusion-free-updates
buildsys-build-rpmfusion-kerneldevpkgs-current.x86_64
                                11:35-0.4.el9             rpmfusion-free-updates
....

For non-free packages, use the following command:

dnf repository-packages rpmfusion-nonfree-updates list
Output
Available Packages
akmod-nvidia.x86_64                3:510.68.02-1.el9   rpmfusion-nonfree-updates
akmod-nvidia-340xx.x86_64          1:340.108-22.el9    rpmfusion-nonfree-updates
akmod-nvidia-470xx.x86_64          3:470.141.03-2.el9  rpmfusion-nonfree-updates
akmod-wl.x86_64                    6.30.223.271-45.el9 rpmfusion-nonfree-updates
broadcom-wl.noarch                 6.30.223.271-21.el9 rpmfusion-nonfree-updates
intel-media-driver.x86_64          21.1.3-1.el9        rpmfusion-nonfree-updates
kmod-nvidia.x86_64                 3:510.68.02-1.el9   rpmfusion-nonfree-updates
kmod-nvidia-340xx.x86_64           1:340.108-22.el9    rpmfusion-nonfree-updates
kmod-nvidia-340xx-5.14.0-148.el9.x86_64
...

Search Packages in RPM Fusion Repo

As you have seen, listing packages are so long. You can search for a specific package in the repository instead.

For example, you can search for the VirtualBox:

dnf repository-packages rpmfusion-free-updates list | grep -i virtualbox
Output
VirtualBox.x86_64                                     6.1.40-1.el9                        rpmfusion-free-updates
VirtualBox-devel.x86_64                               6.1.40-1.el9                        rpmfusion-free-updates
VirtualBox-kmodsrc.noarch                             6.1.40-1.el9                        rpmfusion-free-updates
VirtualBox-server.x86_64                              6.1.40-1.el9                        rpmfusion-free-updates
VirtualBox-webservice.x86_64                          6.1.40-1.el9                        rpmfusion-free-updates
akmod-VirtualBox.x86_64                               6.1.40-1.el9                        rpmfusion-free-updates
kmod-VirtualBox.x86_64                                6.1.40-1.el9                        rpmfusion-free-updates
kmod-VirtualBox-5.14.0-70.el9_0.x86_64                6.1.40-1.el9                        rpmfusion-free-updates
python3-VirtualBox.x86_64                             6.1.40-1.el9                        rpmfusion-free-updates

Disable RPM Fusion Repo on Rocky Linux 9

If you plan to disable RPM fusion, you can use the following commands.

For free repository, use:

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

For non-free repositories, use:

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

Also, you can completely remove it from your server by using the following commands:

Free repository:

sudo dnf remove rpmfusion-free-release 

Non-free repository:

sudo dnf remove rpmfusion-nonfree-release

Conclusion

At this point, you have learned to Enable RPM Fusion Repository on Rocky Linux 9.

Hope you enjoy it.

You may be interested in these articles:

Set up Java_Home Path on Debian 11

How To Install and Use tmux on Linux

Install PostgreSQL 15 on Rocky Linux 8

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!