Problem
Since Fedora 41, DNF might not see the system RPM repositories in the same state as PackageKit-based tools (e.g. GNOME Software, KDE Discover). For example one tool might see a particular repository enabled, while a second tool might see it disabled.
Cause
With the transition to DNF5 in Fedora 41, DNF now uses a different approach when it comes to modifying RPM repository configuration. Instead of directly modifying the .repo
files (usually stored in /etc/yum.repos.d/
), it creates /etc/dnf/repos.override.d/99-config_manager.repo
file, where it stores changes that should be applied to the original repo files. So if you modify repositories through DNF, it will be stored in this override directory. PackageKit and its front-ends (GNOME Software, KDE Discover) aren’t aware of this override directory, and still see (and modify, if requested) the original repo files. That’s why DNF and PackageKit can then see a different configuration of those repo files.
Related Issues
Bugzilla report: 2354865 – libdnf (DNF4) should read DNF5 repo overrides
Workarounds
If you want both DNF and PackageKit to see the same repository configuration, you need to avoid using the override directory at this moment, and modify the repo files directly.
First, check whether /etc/dnf/repos.override.d/99-config_manager.repo
(and possible other files in the same directory) already contains some repo changes listed, and if it does, apply them manually to repo files in /etc/yum.repos.d/
by editing them in a text editor, and then remove /etc/dnf/repos.override.d/99-config_manager.repo
(and possibly the rest of the files in the same directory).
For any future changes, again edit the repo files directly though a text editor, or edit them through PackageKit (pkcon
, GNOME Software, KDE Discover, etc). Avoid using dnf config-manager
, because that would create an override config file instead.