Bug 2566150 - clean-rpm-gpg-pubkey removes Fedora 45 key on Fedora 45
Summary: clean-rpm-gpg-pubkey removes Fedora 45 key on Fedora 45
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: clean-rpm-gpg-pubkey
Version: 45
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Oliver
QA Contact:
URL:
Whiteboard:
: 2569037 (view as bug list)
Depends On:
Blocks: 2481848
TreeView+ depends on / blocked
 
Reported: 2026-11-03 19:41 UTC by Jeffrey Walton
Modified: 2026-11-15 02:04 UTC (History)
4 users (show)

Fixed In Version: clean-rpm-gpg-pubkey-0-15.20261106giteeabfc5.fc45
Clone Of:
Environment:
Last Closed: 2026-11-15 02:04:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github svarshavchik clean-rpm-gpg-pubkey issues 10 0 None open Need to look for `.repo` files in multiple places 2026-11-06 11:16:38 UTC

Description Jeffrey Walton 2026-11-03 19:41:47 UTC
Hi Everyone.  My apologies if I am missing something obvious here.

I am following Upgrading Fedora Linux Using DNF System Plugin [0] to upgrade from Fedora 44 to Fedora 45 on x86_64.  The cleanup tasks at [0] offer a step to remove old Fedora keys.  It appears clean-rpm-gpg-pubkey is removing the previously imported Fedora 45 key:

<BEGIN>
$ sudo dnf system-upgrade download --releasever=45
...
Testing offline transaction
Importing OpenPGP key 0xF577861E:
 UserID     : "Fedora (45) <fedora-45-primary>"
 Fingerprint: 4F50A6114CD5C6976A7F1179655A4B02F577861E
 From       : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-45-x86_64
Is this ok [y/N]: y
The key was successfully imported.

$ sudo dnf offline reboot
...

$ sudo clean-rpm-gpg-pubkey
gpg: keybox '/tmp/kyDEtUOXNY/pubring.kbx' created
gpg: /tmp/kyDEtUOXNY/trustdb.gpg: trustdb created
Removing Fedora (45) <fedora-45-primary> public key
Removing Fedora (44) <fedora-44-primary> public key
Total affected keys: 2
</END>

[0] <https://docs.fedoraproject.org/en-US/quick-docs/upgrading-fedora-offline/>

Reproducible: Always

Steps to Reproduce:
Upgrade according to <https://docs.fedoraproject.org/en-US/quick-docs/upgrading-fedora-offline/>, and then run clean-rpm-gpg-pubkey in optional tasks.
Actual Results:
Fedora 44 and 45 public keys were removed.

Expected Results:
Fedora 44 public key removed; while Fedora 45 public key is retained.

Additional Information:
I'm working on amd64/x86_64.  I have observed it on both KDE Desktop and Server editions.  I do not know if this happens on other arches, like aarch64.

Comment 1 Daniel Anderson 2026-11-05 23:50:41 UTC
I was able to reproduce this with additional keys besides Fedora's (the rpmfusion key exhibits the same symptom) and root cause the problem.

Fedora has moved repository config to the newer /usr/share/dnf5/repos.d and removed it from older/legacy /etc/yum.repos.d

clean-rpm-gpg-pubkey does not read the new path at all, i.e., it does not see the Fedora 45 (or Rpm Fusion) repo config and so does not think any repository is using their gpg keys.

Suggested Fix: Add /usr/share/dnf5/repos.d to clean-rpm-gpg-pubkey's check for configured repos

Comment 2 Fedora Update System 2026-11-06 13:36:48 UTC
FEDORA-2026-17a26a6163 (clean-rpm-gpg-pubkey-0-15.20261106giteeabfc5.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-17a26a6163

Comment 3 Fedora Update System 2026-11-07 02:53:24 UTC
FEDORA-2026-17a26a6163 has been pushed to the Fedora 45 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-17a26a6163`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-17a26a6163

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Peter Oliver 2026-11-09 12:27:11 UTC
*** Bug 2569037 has been marked as a duplicate of this bug. ***

Comment 5 Fedora Update System 2026-11-15 02:04:18 UTC
FEDORA-2026-17a26a6163 (clean-rpm-gpg-pubkey-0-15.20261106giteeabfc5.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.