Articles

Fix GPG errors for bad/deleted keys

Posted at 4:30 pm by brett on June 16th, 2010

Under categories: Ubuntu and tags:

This is a repost of my HOWTO: Fix GPG errors for bad/deleted keys on UbuntuForums.org

I don't know what I did, but one day I started using Ubuntu and all my public signature keys for downloading software were all deleted.

This error popped up after running System > Administration > Update Manager

W: GPG error: http://archive.canonical.com jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://download.virtualbox.org jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DCF9F87B6DFBCBAE
W: GPG error: http://packages.medibuntu.org jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783
W: GPG error: http://archive.ubuntu.com jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://archive.ubuntu.com jaunty-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://archive.getdeb.net jaunty-getdeb-testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A8A515F046D7E7CF
W: GPG error: http://archive.ubuntu.com jaunty-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6E871C4A881574DE
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 28A8205077558DD0
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D739676F7613768D
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8C851674F96FD737
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C0B56813051D8B58
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4874D3686E80C6B7
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 60D11217247D1CFF
W: GPG error: http://archive.ubuntu.com jaunty-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9A06AEF9CB8DB0
W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6D975C4791E7EE5E
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9BF3BB4E5E17B5

W: GPG error: http://ppa.launchpad.net jaunty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FB8BEE0A1F196A8
W: Failed to fetch http://ppa.launchpad.net/chromium-da...jaunty/Release

W: Some index files failed to download, they have been ignored, or old ones used instead.

The fix for this is to re-download the keys using the hexidecimal numbers given in the error (I bolded them above).

NOTE: Your hexadecimal numbers may be different then mine, so make sure to use the hexadecimals numbers in your error, not mine.

Type this command into the terminal (Applications > Accessories > Terminal)

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys #don't actually run this line yet

And then add the hexadecimal numbers to the command (again, these are my keys from my error. Make sure to use your own):

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 DCF9F87B6DFBCBAE 2EBC26B60C5A2783 A8A515F046D7E7CF 6E871C4A881574DE 28A8205077558DD0 D739676F7613768D 8C851674F96FD737 C0B56813051D8B58 4874D3686E80C6B7 60D11217247D1CFF 5A9A06AEF9CB8DB0 6D975C4791E7EE5E 5A9BF3BB4E5E17B5 7FB8BEE0A1F196A8

The output should look like this:

gpg: requesting key 437D05B5 from hkp server keyserver.ubuntu.com
gpg: requesting key 6DFBCBAE from hkp server keyserver.ubuntu.com
gpg: requesting key 0C5A2783 from hkp server keyserver.ubuntu.com
gpg: requesting key 46D7E7CF from hkp server keyserver.ubuntu.com
gpg: requesting key 881574DE from hkp server keyserver.ubuntu.com
gpg: requesting key 77558DD0 from hkp server keyserver.ubuntu.com
gpg: requesting key 7613768D from hkp server keyserver.ubuntu.com
gpg: requesting key F96FD737 from hkp server keyserver.ubuntu.com
gpg: requesting key 051D8B58 from hkp server keyserver.ubuntu.com
gpg: requesting key 6E80C6B7 from hkp server keyserver.ubuntu.com
gpg: requesting key 247D1CFF from hkp server keyserver.ubuntu.com
gpg: requesting key F9CB8DB0 from hkp server keyserver.ubuntu.com
gpg: requesting key 91E7EE5E from hkp server keyserver.ubuntu.com
gpg: requesting key 4E5E17B5 from hkp server keyserver.ubuntu.com
gpg: requesting key A1F196A8 from hkp server keyserver.ubuntu.com
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key " not changed
gpg: key 6DFBCBAE: public key "Sun Microsystems, Inc. (xVM VirtualBox archive signing key) " imported
gpg: key 0C5A2783: public key "Medibuntu Packaging Team " imported
gpg: key 46D7E7CF: public key "GetDeb Archive Automatic Signing Key " imported
gpg: key 881574DE: public key "Launchpad PPA for Bisigi" imported
gpg: key 77558DD0: public key "Launchpad PPA for GNOME Do Core Team" imported
gpg: key 7613768D: public key "Launchpad PPA named vlc for Christoph Korn" imported
gpg: key F96FD737: public key "Launchpad PPA for Paul Gevers" imported
gpg: key 051D8B58: public key "Launchpad PPA for GStreamer developers" imported
gpg: key 6E80C6B7: public key "Launchpad PPA for Banshee Team" imported
gpg: key 247D1CFF: public key "Launchpad PPA for OpenOffice.org Scribblers" imported
gpg: key F9CB8DB0: public key "Launchpad PPA for Ubuntu Wine Team" imported
gpg: key 91E7EE5E: public key "Launchpad PPA for XBMC for Linux" imported
gpg: key 4E5E17B5: public key "Launchpad PPA for chromium-daily" imported
gpg: key A1F196A8: public key "Launchpad PPA for Pidgin Developers" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 15
gpg: imported: 14 (RSA: 12)
gpg: unchanged: 1

Then you should have no more errors!

  • https://launchpad.net/~rugby471 Andrew

    Happened to me as well :-(

    thanks for the guide :-)

  • Alejandrito

    great!
    thanks a lot!
    The explanation was more clear than in: http://ubuntuforums.org/archive/index.php/t-1221323.html

  • Jedlonstein

    thank u thank u thank u

  • Anonymous

    Very useful and simple. I remembered there was a .DEB that do this automatically, but ironically it just confused me.