Clearing GPG BADSIGerrors during update

During a test build of Ubuntu 15.10 I suddenly received the following error when refreshing the packages from the repository.

# sudo apt-get update && sudo apt-get upgrade -y
Reading package lists... Done
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com wily Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>
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.canonical.com wily Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>

To remove the bad signature error, open the terminal (Ctrl+Alt+T) and use the commands given below one by one:

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