Skip to content

Troubleshoot APT Repository Signature and Signing-Key Errors

Admin
November 29, 2026
5 min read
Intermediate
๐Ÿ’ป Target OS: Ubuntu 26.04 LTS
Guide tools
Guide tools
0/0 Steps (0%)

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

01

Classify the update error

Start here

Identify 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.

02

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.

Terminal window
timedatectl status
ls -ld /etc/apt/sources.list.d /etc/apt/keyrings
03

Inspect 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.

Terminal window
ls -l /etc/apt/keyrings/vendor.gpg
gpg --show-keys --with-fingerprint /etc/apt/keyrings/vendor.gpg
04

Choose 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.

05

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.

Terminal window
sudo apt-get -o APT::Update::Error-Mode=any update
06

Verify trusted package selection

Verify

Review 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

Comments