Skip to content
Search Fedora

    Browse this documentation

    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.

    Terminal window
    ls /usr/share/dnf5/repos.d/
    ls /etc/yum.repos.d/
    ls /usr/share/pki/rpm-gpg/ | head -3
    fedora-cisco-openh264.repo
    fedora.repo
    fedora-updates.repo
    fedora-updates-testing.repo
    (/etc/yum.repos.d/ is empty)
    RPM-GPG-KEY-45-fedora
    RPM-GPG-KEY-fedora-10-i386
    RPM-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.

    LocationOwned byHand-edit?On upgrade
    /usr/share/dnf5/repos.d/*.repothe fedora-repos packagenooverwritten
    /etc/yum.repos.d/*.repoyouyeskept
    /etc/dnf/repos.override.d/*.repoconfig-managerno (the header says so)kept

    Confirm ownership:

    Terminal window
    rpm -qf /usr/share/dnf5/repos.d/fedora.repo
    fedora-repos-45-0.6.noarch

    If 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:

    Terminal window
    sudo dnf config-manager setopt updates-testing.enabled=0

    It writes this file:

    Terminal window
    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=0

    Check it took effect:

    Terminal window
    sudo dnf repolist | grep -c updates-testing # 0

    For a single command, nothing is written to disk:

    Terminal window
    sudo dnf repolist --setopt updates-testing.enabled=1 | grep -c updates-testing # 1

    Remember the difference in one line: --setopt is a runtime switch, config-manager setopt persists.

    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:

    Terminal window
    sudo dnf config-manager addrepo --from-repofile=https://example.com/example.repo
    ls /etc/yum.repos.d/
    • /etc/yum.repos.d/ looks empty after an upgrade: the repositories did not disappear, the packaged ones moved. Confirm with dnf repolist.
    • Deletion: rm /etc/yum.repos.d/x.repo only works for custom repositories; deleting files under /usr neither 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.repo break on F45.

    When a repository seems to have vanished, check in this order:

    1. dnf repolist — is it in the list;
    2. ls /usr/share/dnf5/repos.d — is the packaged file there;
    3. ls /etc/dnf/repos.override.d/ — did an override disable it;
    4. dnf repoinfo <id> — the effective enabled and gpgcheck.