GPG Key Marked: Managing a Revoked Personal Key

Abstract: Resolve issues with revoked GPG keys by verifying status, generating a new key pair, and distributing the updated public key to restore secure communication.

Created: 2026-09-22 by

When a GPG personal key is revoked, it is cryptographically marked as invalid but remains in your local keyring. To resolve this, you must first verify the revocation status using gpg --list-keys, then generate a fresh key pair with gpg --full-generate-key, and finally update your public keyserver or distribution channels so contacts can retrieve the new valid identity.

Understanding Key Revocation Status

A revoked GPG key does not disappear from your system automatically. Instead, its status changes to indicate that it should no longer be used for encryption or signing. This state is typically triggered when you suspect the private key has been compromised, lost, or when you simply wish to retire an old identity. The primary indicator of this state is visible when you inspect your keys via the command line. When you run gpg --list-keys, look for the r flag next to the key ID. For example, a line might appear as:
sub   rsa4096 2023-01-01 [R]
uid           [ revoked] John Doe <[email protected]>
The [revoked] tag on the user ID and the R flag on the subkey confirm that the cryptographic trust associated with this specific key has been explicitly withdrawn. It is crucial to understand that this revocation is a local declaration unless you have previously uploaded a revocation certificate to a keyserver. If you only revoke locally, other users will still see the key as valid until they download your updated revocation signature. For more details on managing missing or inaccessible keys, consider reviewing our guide on GPG Could Not Find Key Listed - How to Fix. This often helps distinguish between a truly missing key and one that is merely revoked or hidden due to configuration errors.

Generating a New GPG Key Pair

Once you have confirmed the old key is revoked, the immediate next step is to create a new identity. Modern versions of GnuPG recommend using the full generation wizard to ensure best practices are followed regarding algorithm selection and key size. Execute the following command to start the process:
gpg --full-generate-key
You will be prompted to select the type of key. RSA is widely supported, though EdDSA (specifically ed25519) is increasingly preferred for its speed and security profile. Select the algorithm that matches your needs. Next, choose the key length; for RSA, 4096 bits is the standard recommendation for long-term security, while 2048 bits is considered the minimum acceptable limit. After selecting the algorithm and size, set the expiration date. A common practice is to set a reasonable expiration period, such as two years, rather than "never." This encourages regular key rotation and reduces the impact if a key is compromised later. Finally, provide your real name, email address, and an optional comment. Confirm the information by typing O (for Yes). You will then be asked to enter a passphrase to protect the newly generated private key. Ensure this passphrase is strong and unique, as it is the sole barrier against unauthorized use of your private key.

Distributing Your New Public Key

Creating the key is only half the battle; you must make the new public key available to others. If you do not distribute the new key, your contacts cannot encrypt messages to you or verify signatures made with your new identity. The most robust method is to upload your new public key to a keyserver like keys.openpgp.org. Use the following command, replacing KEYID with the actual ID shown in your --list-keys output:
gpg --keyserver keys.openpgp.org --send-keys KEYID
If you are using GitHub for SSH or code signing, you may need to add the new public key to your account settings. This ensures that any automated systems or collaborators relying on your GitHub identity can validate your new credentials. For guidance on integrating GPG keys with host authentication, see Specify GPG Key Identity for SSH Host Authentication: A Tech Support Guide. Additionally, inform your direct contacts manually if necessary. Send them your new public key file (exported via gpg --armor --export KEYID > newkey.asc) so they can import it into their local keyrings. This manual step is vital for maintaining trust chains in small teams or closed networks where automatic keyserver synchronization is not enabled.

Cleaning Up Old Keys

While you can leave the revoked key in your keyring for historical reference, some users prefer to remove it to keep their workspace clean. Be aware that deleting the secret key means you can never sign anything with it again. To remove the public key entry, use:
gpg --delete-keys KEYID
To remove the corresponding private key, use:
gpg --delete-secret-and-public-key KEYID
Always double-check the key ID before executing deletion commands, as this action is irreversible. Keeping a backup of your old private key in a secure, offline location is recommended in case you ever need to decrypt old data or prove past authorship.

Frequently Asked Questions

Can I recover a revoked GPG key?

No, once a key is revoked, its validity is permanently negated in the web of trust. You cannot reverse the revocation signature without creating a new key. However, you can retain the old private key to decrypt previously encrypted messages, provided you did not delete it from your system.

Why do I still see my revoked key in gpg --list-keys?

GPG keeps revoked keys in your local keyring by default to maintain history and allow you to access old data. The r flag indicates its status, but the entry remains until you manually delete it using --delete-keys.

How do I know if someone else has downloaded my revocation?

You can check the status on the keyserver website or use gpg --refresh-keys to pull the latest updates from configured servers. If your key shows as revoked after refreshing, the network has accepted your revocation certificate.

Should I use RSA or EdDSA for my new key?

EdDSA (ed25519) is generally recommended for new keys because it is faster and uses shorter key lengths for equivalent security. However, RSA remains necessary if you need compatibility with very old software or specific enterprise environments that do not yet support EdDSA.

What happens if I lose my passphrase for the new key?

If you lose the passphrase, the key is effectively lost forever. There is no backdoor or recovery mechanism in GPG. This is why storing backups of your private key files and passphrases in secure, offline locations is critical during the initial setup.

Tags: GPG Security Keys

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More