September 5, 2011 Hatem Ben Yacoub

Ubuntu Howto Fix Repository Signature Verification Issues

Repository signature verification issues in ubuntu are becoming annoying, I’m getting this after apt-get update :

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com natty-updates Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty-updates/Release
W: Some index files failed to download. They have been ignored, or old ones used instead.

here is a quick fix :

$ sudo apt-get clean
$ cd /var/lib/apt
$ sudo mv lists lists.old
$ sudo mkdir -p lists/partial
$ sudo apt-get clean

Should be enough, but still getting error like :

W: GPG error: http://archive.ubuntu.com natty-updates Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key

Try another clean

$ sudo apt-get clean
$ sudo aptitude -o Acquire::http::No-Cache=True -o Acquire::BrokenProxy=true update

Test now

$ sudo apt-get update
$ sudo apt-get upgrade

Fixed !

Tagged: ,

About the Author

Hatem Ben Yacoub Energy Engineer, Entrepreneur, ICT & eGov Consultant with over 15 years experience. Independent Open Data expert.

(HBY) Consultancy