📖 ~1 min read
Table of contents
Symptom & Impact
apt update fails with key verification errors, preventing package refresh and upgrades.
Environment & Reproduction
Usually tied to third-party repositories with outdated signing keys.
sudo apt update
grep -R '^deb ' /etc/apt/sources.list.d
Root Cause Analysis
Repository signing keys are missing, expired, or stored incorrectly for signed-by usage.
Quick Triage
Map each failing repository entry to its keyring path.
grep -R 'signed-by' /etc/apt/sources.list /etc/apt/sources.list.d
ls /etc/apt/keyrings
Step-by-Step Diagnosis
Validate repo definitions and inspect key expiry state.
sudo apt update
apt-key list || true
gpg --show-keys /etc/apt/keyrings/*.gpg 2>/dev/null

Solution – Primary Fix
Refresh vendor keyring files and ensure source entries reference the correct signed-by key.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://example.com/repo.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/example.gpg
sudo apt update

Solution – Alternative Approaches
Disable failing repositories temporarily to restore updates from official archives.
sudo sed -i 's/^deb/# deb/g' /etc/apt/sources.list.d/failing.list
sudo apt update
Verification & Acceptance Criteria
apt update completes with no GPG signature warnings or errors.
sudo apt update
sudo apt upgrade -y
Rollback Plan
Restore previous source files if a key change introduces package trust issues.
sudo cp -a /root/sources.list.d.backup/* /etc/apt/sources.list.d/
sudo apt update
Prevention & Hardening
Prefer repositories that publish key rotation guidance and signed-by keyrings.
sudo grep -R 'signed-by=' /etc/apt/sources.list /etc/apt/sources.list.d
Related Errors & Cross-Refs
Related errors include NO_PUBKEY, EXPKEYSIG, and repository is not signed.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu apt-secure documentation and repository key management guides.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.