Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Very recently when I have been attempting to check for updates on my laptop (Ubuntu 12.04), the check fails.

sudo apt-get update:

W: GPG error: precise Release: The following signatures were invalid: BADSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <>
W: Failed to fetch  No Hash entry in Release file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Index
W: Failed to fetch  No Hash entry in Release file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Index
W: Failed to fetch  No Hash entry in Release file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_restricted_i18n_Index
W: Failed to fetch  No Hash entry in Release file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise_universe_i18n_Index
E: Some index files failed to download. They have been ignored, or old ones used instead.

/etc/apt/sources.list (comments removed):

deb precise main restricted
deb-src precise main restricted

deb precise-updates main restricted
deb-src precise-updates main restricted

deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe

deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse

deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse

deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse

deb precise partner
deb-src precise partner

deb precise main
deb-src precise main
deb precise partner
deb-src precise partner

I'm not sure how to solve the issue and appreciate any input.

share|improve this question
Not sure how this would translate into Ubuntu but I had a similar problem with Debian when my repos were pointing to squeeze. As wheezy was released, the Debian 6 repos were no longer called squeeze but oldstable. Maybe it's the same problem here and your repos are referring to a release by its codename. What does your /etc/apt/sources.list contain? – Joseph R. Jul 11 '13 at 22:10
@JosephR. It's worth a shot. I added the contents of /etc/apt/sources.list to my post – Alex Brooks Jul 11 '13 at 22:25
OK you're on Precise Pangolin, it seems, which is an LTS release so obviously this is not the problem... – Joseph R. Jul 11 '13 at 22:33
On closer inspection of the error messages, have you tried removing the problematic files from /var/lib/apt/lists/partial ? Although removing them should be harmless, don't actually remove them, just rename them and try again. It may be that your apt cache got botched somehow. – Joseph R. Jul 11 '13 at 22:37
@JosephR. I renamed the files and it got rid of all but the first error. I tried choroba's solution afterward to attempt to remove the first error with no success – Alex Brooks Jul 12 '13 at 14:08

2 Answers 2

up vote 1 down vote accepted

After a little more searching I have found the solution.

Remove/Rename the files associated with the errors:

cd /var/lib/apt/lists/partial/
sudo mv us.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Index main_COPY
sudo mv us.archive.ubuntu.com_ubuntu_dists_precise_multiverse_i18n_Index multi_COPY
sudo mv us.archive.ubuntu.com_ubuntu_dists_precise_restricted_i18n_Index res_COPY
sudo mv us.archive.ubuntu.com_ubuntu_dists_precise_universe_i18n_Index uni_COPY

Update the signature:

gpg --keyserver --recv 40976EAF437D05B5

Rebuild the software cache:

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

It is probably possible to skip the first step by simply moving the lists, but I figured it best to describe the entire process I used to remove the errors.

I hope this helps anyone else having this problem.

share|improve this answer

Try importing a new key:

gpg --keyserver --recv 40976EAF437D05B5
gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -
share|improve this answer
I tried your solution but did not have any success; I still receive the same errors. Although when I ran the first command, I found this in the output: gpg: no ultimately trusted keys found – Alex Brooks Jul 11 '13 at 22:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.