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

root@myserver:~# apt-get update
Get:1 http://security.debian.org wheezy/updates Release.gpg [1571 B]
Get:2 http://security.debian.org wheezy/updates Release [102 kB]
Get:3 http://ftp.debian.org 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

Categories: Linux


bayu · December 14, 2015 at 12:32 am


Lanex · May 14, 2016 at 5:30 pm

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 http://archive.ubuntu.com/ubuntu/ trusty/universe debian-archive-keyring all 2012.4 [34.4 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ 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 http://dl.google.com stable InRelease
Hit http://dl.google.com stable Release.gpg
Ign http://extra.linuxmint.com rafaela InRelease
Hit http://dl.google.com stable Release
Ign http://packages.linuxmint.com rafaela InRelease
Hit http://dl.google.com stable/main amd64 Packages
Hit http://extra.linuxmint.com rafaela Release.gpg
Hit http://packages.linuxmint.com rafaela Release.gpg
Hit http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty InRelease
Hit http://packages.linuxmint.com rafaela Release
Hit http://extra.linuxmint.com rafaela Release
Ign http://archive.canonical.com trusty InRelease
Hit http://packages.linuxmint.com rafaela/main amd64 Packages
Hit http://extra.linuxmint.com rafaela/main amd64 Packages
Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://archive.canonical.com trusty Release.gpg
Ign http://dl.google.com stable/main Translation-en_US
Ign http://dl.google.com stable/main Translation-en
Hit http://extra.linuxmint.com rafaela/main i386 Packages
Hit http://packages.linuxmint.com rafaela/upstream amd64 Packages
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://archive.canonical.com trusty Release
Hit http://packages.linuxmint.com rafaela/import amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://archive.canonical.com trusty/partner amd64 Packages
Hit http://packages.linuxmint.com rafaela/main i386 Packages
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty Release.gpg
Hit http://archive.canonical.com trusty/partner i386 Packages
Hit http://packages.linuxmint.com rafaela/upstream i386 Packages
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Get:2 http://archive.ubuntu.com trusty-updates/main amd64 Packages [768 kB]
Hit http://archive.canonical.com trusty/partner Translation-en
Hit http://packages.linuxmint.com rafaela/import i386 Packages
Hit http://security.ubuntu.com trusty-security/restricted i386 Packages
Ign http://extra.linuxmint.com rafaela/main Translation-en_US
Hit http://security.ubuntu.com trusty-security/universe i386 Packages
Ign http://extra.linuxmint.com rafaela/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Get:3 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [15.9 kB]
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Get:4 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [359 kB]
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Get:5 http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages [13.2 kB]
Get:6 http://archive.ubuntu.com trusty-updates/main i386 Packages [737 kB]
Get:7 http://archive.ubuntu.com trusty-updates/restricted i386 Packages [15.6 kB]
Get:8 http://archive.ubuntu.com trusty-updates/universe i386 Packages [360 kB]
Get:9 http://archive.ubuntu.com trusty-updates/multiverse i386 Packages [13.6 kB]
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Ign http://packages.linuxmint.com rafaela/import Translation-en_US
Ign http://packages.linuxmint.com rafaela/import Translation-en
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en
Ign http://packages.linuxmint.com rafaela/main Translation-en_US
Ign http://packages.linuxmint.com rafaela/main Translation-en
Ign http://packages.linuxmint.com rafaela/upstream Translation-en_US
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Ign http://packages.linuxmint.com rafaela/upstream Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://archive.ubuntu.com trusty Release
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty/main i386 Packages
Hit http://archive.ubuntu.com trusty/restricted i386 Packages
Hit http://archive.ubuntu.com trusty/universe i386 Packages
Hit http://archive.ubuntu.com trusty/multiverse i386 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://archive.ubuntu.com 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?

    Petronald Green · June 29, 2016 at 1:06 pm

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

tongai · June 29, 2016 at 10:20 am

Thanks man. It worked

devnull · April 4, 2017 at 10:32 am

You da man. Thanks buddy.

El · December 5, 2017 at 12:22 am

Thank you. It works

Roman · April 24, 2018 at 5:35 am

Thank you, it works!

Peter · July 18, 2018 at 5:23 pm

It not worked for my outdated debian version, but worked repositories generated by https://debgen.xyz/
See here: https://internetlifeforum.com/linux-forums/10893-fix-there-no-public-key-available-following-key-ids-9d6d8f6bc857c906/

Leave a Reply

%d bloggers like this: