You upgraded Fedora and RPM Fusion broke
You just finished a major Fedora upgrade. The system rebooted, you logged in, and you ran sudo dnf upgrade --refresh to catch the latest patches. Instead of updating, DNF complains about missing repositories or GPG key errors. Your third-party apps like VLC or NVIDIA drivers are stuck on old versions, and the package manager refuses to install anything new from RPM Fusion. The upgrade succeeded, but the external repos are still pointing at the old release.
What is actually happening
RPM Fusion provides packages that Fedora cannot include due to licensing or patent restrictions. The repository metadata is versioned per Fedora release. When you upgrade Fedora, the RPM Fusion release packages do not automatically update their repository definitions to match the new release number. The .repo files in /etc/yum.repos.d/ still reference the old Fedora version in their base URLs. DNF checks the metadata, finds a mismatch or a 404 error, and disables the repository to protect system integrity.
The repository files use macros like $releasever to construct URLs. These macros expand based on the installed Fedora version. During an upgrade, the macro expansion might lag or the .repo file might not update automatically. The RPM Fusion release package contains the logic to handle these macros correctly for the current release. Reinstalling the package ensures the macro definitions and the file structure match the package manager's expectations.
The GPG keys might also be rotated or updated for the new release cycle. Fedora's release cadence is six months. The N-2 release goes EOL when N+1 ships. RPM Fusion aligns its key management with this cycle. Reinstalling the release packages forces DNF to overwrite the stale configuration with the correct definitions and keys for your current Fedora version.
Reinstall the release packages
The RPM Fusion release package is not a driver or an application. It is a configuration package. It installs .repo files into /etc/yum.repos.d/ and imports GPG keys into the DNF keyring. The package also sets up repository priorities and includes logic to handle Fedora's release macros. When you reinstall the package, DNF treats it as an update. It overwrites the existing .repo files with the version from the package repository. This process is idempotent. Running the command multiple times produces the same result. It does not duplicate entries or corrupt the configuration.
RPM Fusion splits packages into free and nonfree. The free repo contains open-source packages that depend on non-free components. The nonfree repo contains proprietary blobs like NVIDIA drivers or codecs. You usually need both. The reinstall command installs both release packages to ensure full coverage.
Here is the command to reinstall both RPM Fusion release packages for your current Fedora version.
sudo dnf install -y \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# The $(rpm -E %fedora) macro expands to your current Fedora release number.
# This ensures the command always targets the correct version without manual editing.
# The -y flag accepts the transaction automatically.
# Reinstalling these packages overwrites the .repo files and refreshes the GPG keys.
# Config files in /etc/ are user-modified. Files in /usr/lib/ ship with the package.
# Edit /etc/. Never edit /usr/lib/. RPM Fusion manages files in /etc/yum.repos.d/.
Run dnf upgrade --refresh after reinstalling to pull in any pending updates from the now-working repositories. dnf upgrade --refresh is the normal weekly maintenance command. dnf system-upgrade is for crossing major Fedora releases. They are different commands. Don't conflate them.
Reinstall the release package after every major Fedora upgrade. It takes seconds and prevents dependency hell later.
Verify the repositories
Run this command to list all enabled repositories and confirm RPM Fusion is active.
sudo dnf repolist
# Lists all configured repositories and their status.
# Check for rpmfusion-free and rpmfusion-nonfree entries.
# A valid entry shows a number in the "Packages" or "Matches" column.
# If the count is zero, the repo is enabled but metadata failed to download.
Look for rpmfusion-free and rpmfusion-nonfree in the output. The "Matches" or "Enabled" count should be non-zero. If you see errors about GPG keys, the reinstall likely failed or the key import was interrupted. RPM Fusion maintains separate repositories for stable packages and updates. The release package enables both the main repo and the updates repo. If you see rpmfusion-free-updates in your repo list, that is correct. The updates repo provides bug fixes and security patches for RPM Fusion packages.
Run dnf repolist before you panic. The repo is usually fine. The metadata just needs a refresh.
Common pitfalls and error messages
You might encounter Error: Cannot find a valid baseurl for repo: rpmfusion-free. This happens when the .repo file points to a URL that no longer exists for your release. The fix above resolves this by updating the URL. If you see GPG key retrieval failed, your system cannot reach the key server, or the key has changed. The reinstall command fetches the latest keys.
Another issue is leftover configuration from a previous manual edit. If you edited /etc/yum.repos.d/rpmfusion-free.repo directly, the reinstall will overwrite your changes. Always keep custom modifications in a separate file or note them before reinstalling. DNF logs transactions to /var/log/dnf.log. If a repo error is intermittent, check this file for the exact failure timestamp and HTTP response code.
If the reinstall succeeds but DNF still complains, the metadata cache might be corrupted. Here is how to clear the cache and force a fresh download.
sudo dnf clean all
# Discards all cached metadata and package headers.
# This forces DNF to re-fetch information from the repositories.
sudo dnf upgrade --refresh
# Downloads fresh metadata and applies available updates.
# The --refresh flag ignores cached metadata even if it is not expired.
Trust the package manager. Manual file edits drift, snapshots stay. Reinstall the release package to reset the repo config.
When to use this approach
Use the reinstall command when you have just upgraded Fedora and RPM Fusion repositories are broken or missing. Use manual editing of /etc/yum.repos.d/rpmfusion-free.repo when you need to tweak a specific mirror or enable a sub-repo without overwriting the entire configuration. Use dnf config-manager --set-disabled rpmfusion-free when you want to temporarily stop using RPM Fusion for a transaction. Use dnf system-upgrade when you are performing the major release upgrade itself, not when fixing repos afterward. Stay on the default RPM Fusion setup if you only need standard multimedia codecs and proprietary drivers.
Reinstall the release package after every major Fedora upgrade. It takes seconds and prevents dependency hell later.