Skip to content

Instantly share code, notes, and snippets.

@dogukancagatay
Created January 6, 2025 09:43
Show Gist options
  • Save dogukancagatay/658f42977daa9fe487faeb13b2861780 to your computer and use it in GitHub Desktop.
Save dogukancagatay/658f42977daa9fe487faeb13b2861780 to your computer and use it in GitHub Desktop.
List and remove repository GPG keys on Fedora

List and Remove Repository GPG Keys

This is especially useful when server GPG keys are updated.

List the repository GPG keys that are currently installed with

sudo rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'

Find the GPG key you want to remove from the listed items from the previous command and remove it using it's ID (first column).

sudo rpm -e --allmatches <gpg-pubkey-id>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment