If you are using Ubuntu, there will be times that you will receive errors like this while you are updating:
GPG error: http://archive.ubuntu.com hardy-updates Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
Failed to fetch http://archive.ubuntu.com/ubuntu/dis...6/Packages.bz2 Hash Sum mismatch
Some index files failed to download, they have been ignored, or old ones used instead
This is sometimes caused by your last update where the cache of your computer has not been cleared. In order to still get the updates, here is a possible solution that might solve this error:
sudo apt-get update -o Acquire::http::No-Cache=True
Then you can type in more update commands such as these:
sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade
By the way, just want to remind you that these codes are entered using the terminal, "the command prompt" of Ubuntu.
The terminal is located in Applications>Accessories>Terminal
There you have it!!! Hopefully it will solve the errors you are getting.