Today I encountered another apt-get update GPG error, this time I got error message BADSIG :
GPG error: http://au.archive.ubuntu.com precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <firstname.lastname@example.org>
After a few research I found the solution from askubuntu and stackexchange. Please use the following commands to get rid of your problem.
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
The next step is to clear your apt software cache:
sudo mv lists lists.old
sudo mkdir -p lists/partial
Then you are done, and may try our favourite apt-get command:
And you should encounter no error anymore.
For you who didn’t know yet about apt-get update, it’s a Linux command specifically for Ubuntu and Debian to update apt or software repository cache. Apt-get command itself is a powerful command-line tool to perform such function as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu/Debian system.
Thanks for reading and good luck!