📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

apt update fails with NO_PUBKEY or signature verification warnings for third-party repositories.

Environment & Reproduction

Ubuntu 20.04 with external repositories still using deprecated apt-key workflows.

Root Cause Analysis

Missing/expired repo key or key installed in wrong location without signed-by association.

Quick Triage

Identify failing source file and key ID from apt output, then list active keyrings.

Step-by-Step Diagnosis

Verify repository vendor key fingerprint, inspect source entry options, and remove obsolete key material.

Illustrative mockup for ubuntu-20-04-lts — ubuntu2004-cp23-nopubkey-diagnose.webp
Investigating apt NO_PUBKEY and GPG trust errors — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Install key to ‘/usr/share/keyrings/*.gpg’, update source with ‘signed-by=’, and rerun apt update.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-20-04-lts — ubuntu2004-cp23-nopubkey-fix.webp
Migrating repository keys to signed-by keyrings — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Disable untrusted repository temporarily or replace with official focal-compatible package source.

Verification & Acceptance Criteria

apt update completes with verified signatures and zero NO_PUBKEY messages.

Rollback Plan

Restore prior source definitions if vendor key rotation process introduces temporary incompatibility.

Prevention & Hardening

Track repository key expiry and avoid global trusted keyring for least-trust scope.

The repository is not signed, Release file invalid, and apt-secure verification failures.

Related tutorial: View the step-by-step tutorial for Ubuntu 20.04 LTS.

View all Ubuntu 20.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

apt-secure documentation and Ubuntu guidance for replacing apt-key usage.

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.