54

While running the update at Ubuntu 14.04 LTS (Trusty Tahr). The following error is being encountered:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-amd64/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/multiverse/binary-i386/Packages  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/Translation-en  Hash Sum mismatch

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/universe/i18n/Translation-en  Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.

command used:

sudo apt-get update

1 Answers1

98

Enter the following commands in a Terminal:

sudo rm -vf /var/lib/apt/lists/*
sudo apt-get update
  • 17
    +1 for me. However, it would be great if you could comment why this issue happens. – ECII Nov 30 '14 at 13:23
  • 1
    +1 what is the root cause? – Capacytron Apr 30 '15 at 10:47
  • 7
    see this answer for the root cause: http://askubuntu.com/a/160179/66329 -- TLDR: due to race conditions, your local repo cache can get into an inconsistent state; so delete it and apt-get update will refresh the whole thing from source – Justin Ludwig May 09 '15 at 20:17
  • 6
    after that i got "Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/main/binary-amd64/Packages Hash Sum mismatch" – vuhung3990 Aug 02 '15 at 05:38
  • 1
    If you still get the other error, remove everything from the partials directory `sudo rm /var/lib/apt/lists/partials/* -vf – spuder Nov 30 '15 at 22:07
  • A "-r" should probably be added to the rm command. I had to remove the contents of the "partial" directory to get the repositories back into a stable state. – Nerdfest Dec 21 '15 at 17:26
  • 1
    I too got the "Hash Sum mismatch" error, and neither of the solutions have worked. – Clayton Dukes Jan 11 '16 at 18:05
  • 13
    I fixed it using sudo apt-get clean; sudo apt-get update – Clayton Dukes Jan 11 '16 at 18:07
  • 1
    I also continued to receive the Hash sum mismatch at first attempt, removing partials helped thanks! – itnet7 Jan 28 '16 at 15:05
  • I had this problem and found that I had to run the solution on my mirror, not my local client that was using the mirror. Then just run sudo apt-mirror as usual afterwards to update the mirror and wait for it to finish. – Programster Apr 01 '16 at 09:30
  • 1
    None of these work for me. My apt-get remains a clusterfuck and it all started one day without any tinkering to trigger it. – matanox Apr 09 '16 at 11:58
  • 2
    @ClaytonDukes After sudo rm /var/lib/apt/lists/* -vf, I repeated sudo apt-get clean; sudo apt-get update several times, then finally this issue is fixed. – Eric May 04 '16 at 06:28