Skip to content

How to fix no public key available for the following key IDs in debian

On new debian servers, upon attempting to apt-get update you may see the following error

root@myserver:~# apt-get update
Get:1 wheezy/updates Release.gpg [1571 B]
Get:2 wheezy/updates Release [102 kB]
Get:3 wheezy Release.gpg [2390 B]
Reading package lists... Done
W: There is no public key available for the following key IDs:
W: There is no public key available for the following key IDs:

The easiest way i’ve found to solve this problem is to do the following.

apt-get install debian-keyring debian-archive-keyring

Try to update again

apt-get update

And voilia! No more errors

Published inLinux


  1. bayu bayu


  2. Lanex Lanex

    I want to thank you for your time and trouble, it was very kind of you. Unfortunately, in my case, it did not work. this was the result:

    QuadCore ~ $ sudo apt-get install debian-keyring debian-archive-keyring
    [sudo] password for lanex:
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    The following NEW packages will be installed:
    debian-archive-keyring debian-keyring
    0 upgraded, 2 newly installed, 0 to remove and 91 not upgraded.
    Need to get 48.7 MB of archives.
    After this operation, 55.7 MB of additional disk space will be used.
    Get:1 trusty/universe debian-archive-keyring all 2012.4 [34.4 kB]
    Get:2 trusty/universe debian-keyring all 2014.03.03 [48.7 MB]
    Fetched 48.7 MB in 10s (4,481 kB/s)
    Selecting previously unselected package debian-archive-keyring.
    (Reading database … 160388 files and directories currently installed.)
    Preparing to unpack …/debian-archive-keyring_2012.4_all.deb …
    Unpacking debian-archive-keyring (2012.4) …
    Selecting previously unselected package debian-keyring.
    Preparing to unpack …/debian-keyring_2014.03.03_all.deb …
    Unpacking debian-keyring (2014.03.03) …
    Setting up debian-archive-keyring (2012.4) …
    Setting up debian-keyring (2014.03.03) …
    lanex@QuadCore ~ $ sudo apt-get update
    Ign stable InRelease
    Hit stable Release.gpg
    Ign rafaela InRelease
    Hit stable Release
    Ign rafaela InRelease
    Hit stable/main amd64 Packages
    Hit rafaela Release.gpg
    Hit rafaela Release.gpg
    Hit trusty-security InRelease
    Ign trusty InRelease
    Hit rafaela Release
    Hit rafaela Release
    Ign trusty InRelease
    Hit rafaela/main amd64 Packages
    Hit rafaela/main amd64 Packages
    Get:1 trusty-updates InRelease [65.9 kB]
    Hit trusty-security/main amd64 Packages
    Hit trusty Release.gpg
    Ign stable/main Translation-en_US
    Ign stable/main Translation-en
    Hit rafaela/main i386 Packages
    Hit rafaela/upstream amd64 Packages
    Hit trusty-security/restricted amd64 Packages
    Hit trusty Release
    Hit rafaela/import amd64 Packages
    Hit trusty-security/universe amd64 Packages
    Hit trusty/partner amd64 Packages
    Hit rafaela/main i386 Packages
    Hit trusty-security/multiverse amd64 Packages
    Hit trusty Release.gpg
    Hit trusty/partner i386 Packages
    Hit rafaela/upstream i386 Packages
    Hit trusty-security/main i386 Packages
    Get:2 trusty-updates/main amd64 Packages [768 kB]
    Hit trusty/partner Translation-en
    Hit rafaela/import i386 Packages
    Hit trusty-security/restricted i386 Packages
    Ign rafaela/main Translation-en_US
    Hit trusty-security/universe i386 Packages
    Ign rafaela/main Translation-en
    Hit trusty-security/multiverse i386 Packages
    Hit trusty-security/main Translation-en
    Hit trusty-security/multiverse Translation-en
    Get:3 trusty-updates/restricted amd64 Packages [15.9 kB]
    Hit trusty-security/restricted Translation-en
    Get:4 trusty-updates/universe amd64 Packages [359 kB]
    Hit trusty-security/universe Translation-en
    Get:5 trusty-updates/multiverse amd64 Packages [13.2 kB]
    Get:6 trusty-updates/main i386 Packages [737 kB]
    Get:7 trusty-updates/restricted i386 Packages [15.6 kB]
    Get:8 trusty-updates/universe i386 Packages [360 kB]
    Get:9 trusty-updates/multiverse i386 Packages [13.6 kB]
    Hit trusty-updates/main Translation-en
    Ign rafaela/import Translation-en_US
    Ign rafaela/import Translation-en
    Hit trusty-updates/multiverse Translation-en
    Ign rafaela/main Translation-en_US
    Ign rafaela/main Translation-en
    Ign rafaela/upstream Translation-en_US
    Hit trusty-updates/restricted Translation-en
    Ign rafaela/upstream Translation-en
    Hit trusty-updates/universe Translation-en
    Hit trusty Release
    Hit trusty/main amd64 Packages
    Hit trusty/restricted amd64 Packages
    Hit trusty/universe amd64 Packages
    Hit trusty/multiverse amd64 Packages
    Hit trusty/main i386 Packages
    Hit trusty/restricted i386 Packages
    Hit trusty/universe i386 Packages
    Hit trusty/multiverse i386 Packages
    Hit trusty/main Translation-en
    Hit trusty/multiverse Translation-en
    Hit trusty/restricted Translation-en
    Hit trusty/universe Translation-en
    Ign trusty/main Translation-en_US
    Ign trusty/multiverse Translation-en_US
    Ign trusty/restricted Translation-en_US
    Ign trusty/universe Translation-en_US
    Fetched 2,349 kB in 7s (296 kB/s)
    Reading package lists… Done
    W: There is no public key available for the following key IDs:

    Did I do a boo boo?

    • This is a bit late but in your case try
      sudo apt-key adv –keyserver –recv-keys 1397BC53640DB551

  3. tongai tongai

    Thanks man. It worked

  4. You da man. Thanks buddy.

  5. El El

    Thank you. It works

  6. Thank you, it works!

  7. Vinod Reddy Vinod Reddy

    worked liked a charm, thank you ?

Leave a Reply

%d bloggers like this: