How to fix W: There is no public key available for the following key IDs in APT

APTBEGINNERMEDIUMUpdated Dec 29, 2025· 217 views

This warning appears when apt cannot verify repository signatures because GPG keys are missing. It typically occurs after adding a new PPA or repository. You can fix it by importing the missing GPG keys from key servers.

Quick fix

Fixes W: There is no public key available for the following key IDs

W: There is no public key available for the following key IDs:
467B942D3A79BD29
  1. Identify the missing key ID from the warning message
  2. Import the key from Ubuntu's key server (recommended for Ubuntu)
  3. Verify the key was imported and update apt
  4. If Ubuntu key server is unavailable, use an alternative
apt — error
W: There is no public key available for the following key IDs:
467B942D3A79BD29
W: There is no public key available for the following key IDs

What this error means

The "no public key available" warning occurs when apt-get update cannot verify the authenticity of packages from a repository. Every Debian/Ubuntu repository signs its packages with a GPG (GNU Privacy Guard) key for security verification. When apt tries to update but can't find the public key, it means either: 1. You've recently added a new repository (PPA) that apt doesn't yet know about 2. The repository's key has changed or been rotated 3. The key server is temporarily unavailable 4. Your system's keyring is out of sync While this is technically just a warning (not an error that stops updates), it indicates security verification is failing, which is worth fixing.

Typical symptoms

  • apt-get update prints yellow warning messages starting with 'W: There is no public key'
  • The warning includes a long hexadecimal key ID (like '467B942D3A79BD29')
  • apt-get update still completes, but packages from that repository can't be verified
  • apt install commands may refuse to install from unverified sources
  • CI/CD pipelines fail during container builds with this warning

Common causes

  1. A new repository (PPA) was added to sources.list without importing its signing key
  2. The repository's GPG key has been rotated and your system hasn't received the update
  3. The public key server is temporarily down or unreachable
  4. The repository maintainer changed the signing key without prior notice
  5. Multiple repositories are present, but only some keys are missing

How to fix "W: There is no public key available for the following key IDs"

1Identify the missing key ID from the warning message

When you run apt-get update, the warning will show:

bash
W: There is no public key available for the following key IDs:
467B942D3A79BD29

Copy the key ID (the hexadecimal string like '467B942D3A79BD29'). You'll use this in the next step.

Note: The key ID shown might be the last 16 characters of a longer fingerprint. That's fine—it's unique enough to find the key.

2Import the key from Ubuntu's key server (recommended for Ubuntu)

On Ubuntu systems, use the Ubuntu key server for fastest retrieval:

bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys YOUR_KEY_ID

Replace YOUR_KEY_ID with the actual key ID. For example:

bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29

Once imported, you should see:

bash
gpg: key 467B942D3A79BD29: public key "..." imported
3Verify the key was imported and update apt

After importing, run apt-get update again to verify the key is now recognized:

bash
sudo apt-get update

The warning for that key should no longer appear. If you added multiple repositories, you may see warnings for additional missing keys—repeat steps 1-2 for each one.

You can also list all trusted keys with:

bash
apt-key list
4If Ubuntu key server is unavailable, use an alternative

If the Ubuntu key server is slow or unreachable, try a different key server:

bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys YOUR_KEY_ID

Or use pgp.mit.edu:

bash
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys YOUR_KEY_ID

Or use keys.openpgp.org:

bash
sudo apt-key adv --keyserver keys.openpgp.org --recv-keys YOUR_KEY_ID

Try different servers if one fails.

5For specific repositories (alternative method with GPG)

If apt-key doesn't work (it's deprecated on newer systems), download and import the key directly using GPG:

bash
gpg --keyserver keyserver.ubuntu.com --recv-keys YOUR_KEY_ID
gpg --armor --export YOUR_KEY_ID | sudo apt-key add -

For specific repositories like Google Chrome or Microsoft packages, check their documentation for the exact key URL, then import with curl or wget:

bash
# For Google Chrome
wget -qO- https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

# For Microsoft packages
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg

Advanced notes

apt-key is deprecated: On Ubuntu 22.04 and newer, apt-key is deprecated in favor of storing keys in /usr/share/keyrings/*.gpg. For new repositories, maintainers should provide installation scripts that use the newer method. However, apt-key adv still works for compatibility.

Key server synchronization: Key servers (keyserver.ubuntu.com, pgp.mit.edu, etc.) are synchronized but not instantly. If a key is newly uploaded, it may take minutes to hours to appear on all servers. If a key server is slow, try another.

Partial key IDs: The warning shows only the last 16 characters of a key's full 40-character fingerprint. This is sufficient and intentional for readability, though some tools may ask for the full fingerprint.

Repository-specific keys: Some repositories (like Google Chrome, VSCode) provide their own key URLs in their setup documentation. Always use their recommended installation method first before resorting to manual key imports.

Security consideration: Only import keys from trusted sources. If a repository suddenly changes its key without notice, verify the change through official channels before importing the new key.

Frequently asked questions

What does "W: There is no public key available for the following key IDs" mean?
The "no public key available" warning occurs when apt-get update cannot verify the authenticity of packages from a repository. Every Debian/Ubuntu repository signs its packages with a GPG (GNU Privacy Guard) key for security verification. When apt tries to update but can't find the public key, it means either: 1.
How do I fix "W: There is no public key available for the following key IDs"?
This warning appears when apt cannot verify repository signatures because GPG keys are missing. It typically occurs after adding a new PPA or repository. You can fix it by importing the missing GPG keys from key servers.
What causes "W: There is no public key available for the following key IDs"?
A new repository (PPA) was added to sources.list without importing its signing key The repository's GPG key has been rotated and your system hasn't received the update The public key server is temporarily down or unreachable
Is the "W: There is no public key available for the following key IDs" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading