GPG Key Expired — Package Signature Verification and Key Management Errors
Warningsecurity
Overview
Fix GPG key expired errors that prevent package installation, repository updates, and signature verification on Linux systems.
Key Details
- GPG (GNU Privacy Guard) keys are used to sign and verify packages, repositories, and files
- Package managers (apt, yum/dnf) verify repository signatures using GPG keys
- Keys have expiration dates and must be renewed or replaced when they expire
- Expired keys cause 'EXPKEYSIG' or 'NO_PUBKEY' errors during package updates
- Third-party repository keys are the most common source of expired key issues
Common Causes
- Repository GPG signing key expired and the system has the old key cached
- Third-party repository has not been updated with the new key
- System date is incorrect, making valid keys appear expired
- GPG key was not properly added when the repository was configured
Steps
- 1Identify the expired key: the error message includes the key ID (e.g., EXPKEYSIG 1234ABCD)
- 2Refresh the key from the keyserver: 'sudo gpg --keyserver keyserver.ubuntu.com --recv-keys KEY_ID'
- 3For apt: 'sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com KEY_ID' (deprecated) or use signed-by
- 4Check system date: 'date' — if incorrect, fix with 'sudo timedatectl set-ntp true'
- 5For persistent issues: download the current key from the repository's website and add it manually
Tags
gpgkey-expiredpackage-managersignatureapt
Related Items
More in Security
windows-defender-errorsWindows Defender Errors — Antivirus Not Working or Updating
Errorwindows-error-0x80073b01-defender-serviceWindows Error 0x80073B01 — Windows Defender Service Failed to Start
Errorwindows-bitlocker-recovery-key-errorsBitLocker Recovery Key Errors — Drive Locked and Recovery Key Not Found
Criticalmac-gatekeeper-app-blockedMac Gatekeeper — App Cannot Be Opened (Unidentified Developer)
Warningmac-filevault-recovery-errorsMac FileVault Errors — Encryption, Decryption & Recovery Key Issues
Errormac-keychain-errors-passwordsMac Keychain Errors — Password Prompts, Locked Keychain, and Repair Guide
WarningFrequently Asked Questions
Not recommended. GPG verification ensures packages are from trusted sources and have not been tampered with. Ignoring key errors (--allow-unauthenticated) bypasses this security check and could allow malicious packages.