Fedora repositories and dnf5
Fedora’s repository model is not complicated, but the boundary between official and third-party repositories has to be drawn first: the official docs treat third-party software as its own section with its own enablement steps. Mix them and, when something breaks, you cannot even say who maintains the package.
Default repositories: fedora / updates / updates-testing / rawhide
Section titled “Default repositories: fedora / updates / updates-testing / rawhide”The official docs describe official repositories and third-party software separately: RPM Fusion, Flathub, Snap, AppImage and source installs each get their own subsection under Third Party Software, with their own steps.
A normal Fedora install splits repositories by purpose. The official repository page describes each one, and the corresponding .repo files are:
| Repository | .repo file | Purpose |
|---|---|---|
| fedora | fedora.repo | stable content as shipped with the release |
| updates | fedora-updates.repo | the update stream for stable releases; enabled by default and normally kept enabled |
| updates-testing | fedora-updates-testing.repo | staging for updates before they go stable (update candidates) |
| rawhide | fedora-rawhide.repo | the only repository on Rawhide: enable it on Rawhide systems, never on others |
The repository names and
.repofile names come from the official Fedora DNF repositories page (docs.fedoraproject.org); contents change over time, so check the official page before quoting this long-term.
Since F45: repository configuration lives in two places
Section titled “Since F45: repository configuration lives in two places”Fedora 45 moves the distribution’s own repository configuration from /etc/yum.repos.d to /usr/share/dnf5/repos.d, and the repository GPG keys from /etc/pki/rpm-gpg to /usr/share/pki/rpm-gpg (official change proposal RelocateRpmRepoConfigsToUsr).
# Turn off a packaged repository with an override; do not edit package-owned files under /usrsudo dnf config-manager setopt updates-testing.enabled=0Three boundaries to remember:
- Packaged repositories (fedora / updates / updates-testing / rawhide): under
/usr/share/dnf5/repos.d/, owned by thefedora-repospackage, overwritten on upgrade — do not edit them by hand; - Custom and third-party repositories: still under
/etc/yum.repos.d/, andconfig-manager addrepodrops the.repofrom a release package there too; - Toggling packaged repositories:
setoptwrites to/etc/dnf/repos.override.d/99-config_manager.repo(generated by libdnf5, marked as not to be edited by hand).
Adding, enabling and removing repositories
Section titled “Adding, enabling and removing repositories”The official Quick Docs page Adding or removing software repositories in Fedora documents dnf config-manager’s addrepo / setopt usage, and the practice of deleting .repo files under /etc/yum.repos.d. Three kinds of actions map to three kinds of commands:
# Add: stage the .repo file somewhere temporary, then hand it to config-managersudo dnf config-manager addrepo --from-repofile=/tmp/example.repo
# Enable / disable: change enabled by repository IDsudo dnf config-manager setopt example.enabled=1sudo dnf config-manager setopt example.enabled=0
# Remove: find out which file owns the repository ID first, then delete the filegrep -E "^\[.*]" /etc/yum.repos.d/*sudo rm /etc/yum.repos.d/example.repoSince F45: the rm above only applies to custom repositories under /etc/yum.repos.d/. Packaged repositories live under /usr/share/dnf5/repos.d/; deleting those files neither works nor survives an upgrade — turn them off with setopt.
Third-party sources: installing RPM Fusion
Section titled “Third-party sources: installing RPM Fusion”RPM Fusion’s own configuration page gives the enablement commands: build the free and nonfree release package names with rpm -E %fedora, then install them with dnf install.
sudo dnf install \ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpmRPM Fusion is only one entry in the official Third Party Software section; the same section also covers Flathub, the Snap Store, AppImage and source installs — each with its own steps, so do not generalise from “install a release package” to every source.
RPM Fusion’s configuration page also shows a typical syntax difference: enabling the fedora-cisco-openh264 repository is sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1 on Fedora 41 and later, and sudo dnf config-manager --enable fedora-cisco-openh264 on Fedora 40 and earlier. Same action, two dnf generations; for the full difference and migration path see Moving from dnf to dnf5.
Syntax changes under dnf5
Section titled “Syntax changes under dnf5”The addrepo --from-repofile= and setopt <repo>.enabled=1|0 above are the dnf5 syntax, and the official Quick Docs repository page already gives examples in the new form. Scripts that still use old switches such as --enable / --disable have to be rewritten for repository management; a blanket sed replacement is not enough, because the parameter shape changed from “on/off switch” to “key-value setting”.
Caches and mirrors
Section titled “Caches and mirrors”Official repository packages come from the official mirror network rather than a hard-coded site. The official repository page gives a query form like https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f44&arch=x86_64 — swap in your repo and architecture to check whether mirrors are available:
| Mirror | Repository root |
|---|---|
| Official mirror list (metalink) | https://mirrors.fedoraproject.org |
| Fedora primary | https://dl.fedoraproject.org/pub/fedora/linux |
| Official download | https://download.fedoraproject.org/pub/fedora/linux |
The addresses in the table come from the fedora profile in
src/data/distro-profiles.json(registered with evidence per entry); the mirror network changes, so check the official page before quoting this long-term.
Related pages
Section titled “Related pages”- COPR third-party repositories — community-built add-on sources
- Module streams (retired) — F45 has none left
- Error lookup — repository messages and fixes
- Moving from dnf to dnf5 — subcommands, plugins and script rewrites
- Fedora releases and EOL table — the release state decides which repository line you use
- Install Fedora (Workstation / Server) — check the repository list right after installing
- Fedora release cadence and support window — how updates / updates-testing relate to the release window
- Official: Fedora DNF repositories, Adding or removing software repositories in Fedora, RPM Fusion Configuration