Troubleshoot APT Repository Signature and Signing-Key Errors
Guide tools
Before You Start
Use an Ubuntu host with access to its APT output, clock, and source configuration. Identify the administrator who owns the affected repository. Record the exact message and repository URL from the last approved apt-get update.
Troubleshooting Steps
Classify the update error
Start hereIdentify the failing source, suite, and error. NO_PUBKEY suggests APT lacks the required key. EXPKEYSIG can indicate an expired signing key. A Release file reported as not yet valid also warrants a clock check. An unsigned or missing Release file calls for source or mirror review.
Check the clock and exact source definition
Read the clock and find the corresponding .sources or .list entry. Compare URI, suite and Signed-By with current vendor instructions. Check for duplicate entries for the same source and suite with conflicting signing options.
timedatectl statusls -ld /etc/apt/sources.list.d /etc/apt/keyringsInspect the referenced keyring
Use the actual keyring path from Signed-By. It must be readable for APTโs unprivileged acquisition process. Compare the complete fingerprint and expiration with the vendorโs official installation documentation. The example path represents a third-party keyring.
ls -l /etc/apt/keyrings/vendor.gpggpg --show-keys --with-fingerprint /etc/apt/keyrings/vendor.gpgChoose the matching correction
Fix the host clock if it is wrong. If an official key rotation occurred, confirm the replacement fingerprint through a trusted channel. Use the vendor-approved format, update only the matching Signed-By reference, and save the previous source entry and keyring.
Refresh indexes through the normal update process
Run an approved refresh. It changes package indexes without installing upgrades. Use strict error mode so a failed source is visible even if unrelated sources succeed. A missing Release file or repeat expiry error needs source owner review.
sudo apt-get -o APT::Update::Error-Mode=any updateVerify trusted package selection
VerifyReview the affected repositoryโs package candidate with apt-cache policy and confirm the intended origin. If the correction regresses another approved source, restore the prior files and keep the affected third-party source disabled through its owner until trust is restored.
References
Your feedback keeps these production procedures accurate and battle-tested.