Apt-get update errors

I have been searching for hours to try and bring an end to these errors.

sudo apt-get update 
W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_natty_universe_source_Sources  Hash Sum mismatch

I burnt several CD's, verified them, used the install cd to check for memory issues, and even calculated the md5 of my download.

All of the usual suspects checked out.

I have done previous installs using this disk and they where running fine. Connected at the same location is another (i386) box that is able to run apt-get just fine. I have looked around and tried a myriad of different methods to clear the lists or change the source by I am nearly sure it's a local issue.

The box in question is a Dell Inspirion 530 with two attached nics. Sorry for not including more details but am not sure what log to dump or what info is useable but will upon any request to do so.



In response to suggestions that symptoms might be a result of downloading issue (I would have to agree) I have run the following tests.

steven@DellServer:~$ ping us.archive.ubuntu.com
PING us.archive.ubuntu.com ( 56(84) bytes of data.
64 bytes from lithium.canonical.com ( icmp_req=1 ttl=47 time=157 ms

It is resolving and can reach the host. I flushed the lists.

steven@DellServer:~$ sudo rm -rf /var/lib/apt/lists/*
steven@DellServer:~$ sudo mkdir -p /var/lib/apt/lists/partial

And tried again. I got similar errors for multiple lists.

bzip2: Data integrity error when decompressing.
W: Failed to fetch gzip: ... Hash Sum mismatch

I even put the box on my secondary ISP's line. Same result. I also checked and there is no file in /etc/apt/atp.conf.d/01proxy and I haven't set the environment variable for any proxy.

Downloading a package list manually with wget and decompressing bzip2 failed, returning the same bzip error. Using gzip on the .gz also failed. I sftp'd the .bz2 that the server had downloaded onto my where it also failed.

I downloaded it from the archive onto my workstation and I was able to decompress it. Same for the .gz. The problem must lie in the download but I am puzzled how this could be seeing as both my workstation and my server are on the same connection to my ISP and it's networking seems to be functioning well.

Since the interface in question is a PCI NIC I have decided to reinstall with them out and use the integrated NIC.


following nik's logic I removed the nic and used the integrated interface and I am no longer having problems except for the useless nic I wanted to use.

Thanks nik

  • :-) I see that your are confusing your nic's there. Good to see your problem is solved. – nik May 23 '11 at 7:15
  • Good call. That was a close one. :D – Steven W May 23 '11 at 8:46

Try this once,

Open a terminal and execute,

 sudo rm -rf /var/lib/apt/lists/partial/*   

While the 'rm -rf' command is dangerous, running it specifically for the above path is not going to harm your system. If there is a bad copy lying around there causing this hash-failure, it might fix your problem.

Retry the 'update' after that command is done cleaning up the partially downloaded lists.

You could also check for any partial files existing in that path when the command fails. You might find the file in your question hanging around when the command failed.

One theory is, the list download failed (you got an incomplete file) and the hash-check failed on it.

Update on your two comments.
I suspect that you have a problem with getting the list.
Removal of the list causes fetching it again and sometimes it reaches you properly.
When it does not, your update fails as you describe in your question.

I think moving away from the distro is a strong step for this -- try to figure out why your download does not work properly.

  • Seems to have fixed it even though I swear I did this exact procedure last night. – Steven W May 22 '11 at 17:55
  • After working beautifully for all of three minutes this problem has returned and I have absolutely no idea how to fix it. I guess I'll look into using a different distro. – Steven W May 22 '11 at 18:01
  • Agree on the download issues. You may have a network device (firewall? proxy?) that's terminating the file transfer before it fully completes. – Shane Madden May 22 '11 at 18:47
  • I updated the question with info after investigating the process of getting the list. – Steven W May 23 '11 at 2:23
  • rm-ing the partial dir worked! After 2 hours of my 1st Ubuntu install, you saved me. Thx! – user97249 Oct 8 '11 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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