F45 moves repository configuration to /usr: paths, GPG and overrides
Fedora 45 moves packaged 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).
This is not “Fedora no longer uses /etc” — only the part owned by packages moved. Every section below carries real output from F45.
What it looks like after the move
Section titled “What it looks like after the move”ls /usr/share/dnf5/repos.d/ls /etc/yum.repos.d/ls /usr/share/pki/rpm-gpg/ | head -3fedora-cisco-openh264.repofedora.repofedora-updates.repofedora-updates-testing.repo(/etc/yum.repos.d/ is empty)RPM-GPG-KEY-45-fedoraRPM-GPG-KEY-fedora-10-i386RPM-GPG-KEY-fedora-10-ppc/etc/yum.repos.d/ is an empty directory, not a missing one — the easiest thing to misread after an upgrade.
Three boundaries
Section titled “Three boundaries”| Location | Owned by | Hand-edit? | On upgrade |
|---|---|---|---|
/usr/share/dnf5/repos.d/*.repo | the fedora-repos package | no | overwritten |
/etc/yum.repos.d/*.repo | you | yes | kept |
/etc/dnf/repos.override.d/*.repo | config-manager | no (the header says so) | kept |
Confirm ownership:
rpm -qf /usr/share/dnf5/repos.d/fedora.repofedora-repos-45-0.6.noarchIf rpm -qf names a package, do not edit that file by hand.
Enabling or disabling a packaged repository
Section titled “Enabling or disabling a packaged repository”To turn off a packaged repository such as updates-testing, do not edit the file under /usr:
sudo dnf config-manager setopt updates-testing.enabled=0It writes this file:
sudo cat /etc/dnf/repos.override.d/99-config_manager.repo# Generated by libdnf5.# Do not modify this file manually, use dnf5 config-manager instead.[updates-testing]enabled=0Check it took effect:
sudo dnf repolist | grep -c updates-testing # 0One-shot override: --setopt
Section titled “One-shot override: --setopt”For a single command, nothing is written to disk:
sudo dnf repolist --setopt updates-testing.enabled=1 | grep -c updates-testing # 1Remember the difference in one line: --setopt is a runtime switch, config-manager setopt persists.
Custom and third-party repositories
Section titled “Custom and third-party repositories”Repositories you add yourself still go in /etc/yum.repos.d/. Measured on F45: dropping a test .repo into that directory is picked up by dnf as usual — so “F45 no longer uses /etc” is wrong.
config-manager addrepo writes there too:
sudo dnf config-manager addrepo --from-repofile=https://example.com/example.repols /etc/yum.repos.d/How it relates to upgrades and deletion
Section titled “How it relates to upgrades and deletion”/etc/yum.repos.d/looks empty after an upgrade: the repositories did not disappear, the packaged ones moved. Confirm withdnf repolist.- Deletion:
rm /etc/yum.repos.d/x.repoonly works for custom repositories; deleting files under/usrneither takes effect nor survives the next upgrade. - Hard-coded paths in scripts: backup scripts or configuration-management templates that assume
/etc/yum.repos.d/fedora.repobreak on F45.
Troubleshooting order
Section titled “Troubleshooting order”When a repository seems to have vanished, check in this order:
dnf repolist— is it in the list;ls /usr/share/dnf5/repos.d— is the packaged file there;ls /etc/dnf/repos.override.d/— did an override disable it;dnf repoinfo <id>— the effectiveenabledandgpgcheck.
Related pages
Section titled “Related pages”- COPR third-party repositories — still written into /etc/yum.repos.d
- Error lookup — repository and signature messages
- Fedora 45: changes, download and upgrade — the six changes at a glance
- Fedora repositories and dnf5 — full repository operations
- Signature enforcement — what happens when
gpgcheckfails - Upgrading to Fedora 45 — post-upgrade checks
- Official: F45 Change Proposal: RelocateRpmRepoConfigsToUsr