If you get a message like the following while running apt-get update
on Ubuntu:
W: GPG error: http://archive.ubuntu.com hardy-security Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key
Try deleting the files in /var/lib/apt/lists/ (but leave the 'partial' directory alone) and running apt-get update
again.