This question already has an answer here:

I have just installed 16.04 LTS. However, I cannot update.

$ sudo apt-get update
Fetched 34,3 MB in 1h 51min 52s (5.110 B/s)                                     
Reading package lists... Done
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/universe/binary-i386/by-hash/SHA256/e145fc3961ba6091b075afe8b3a89a5f58e1346b7d6cb0a1f4166dfcc3201392  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

I tried to many thing, but didn't help. I tried the solutions from Trouble downloading packages list due to a "Hash sum mismatch" error, but it didn't solve the problem.

marked as duplicate by Anwar, Pilot6, Eric Carvalho, Kevin Bowen, Zanna Nov 8 '16 at 21:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @GautamVashisht No I tried that solutions but it didn't solve the problem. – dumadum Nov 7 '16 at 19:14
  • 1
    Did you do sudo apt clean after doing sudo rm -rf /var/lib/apt/lists/* ? – Gautam Vashisht Nov 7 '16 at 19:17
  • It helped thanks, but now, I cannot install anything from terminal. For example:sudo apt-get install opera Reading package lists... Done Building dependency tree Reading state information... Done Package opera is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'opera' has no installation candidate – dumadum Nov 8 '16 at 13:41
  • Do sudo apt update first and then do sudo apt install opera – Gautam Vashisht Nov 8 '16 at 13:53
  • @GautamVashisht I am sorry to forget to say, yes I did update than install opera. – dumadum Nov 8 '16 at 13:55

To get rid of this error, hit the keyboard shortcut Ctrl+Alt+T to open a terminal window.

Then type the commands given below in the terminal one-by-one:

sudo rm -rf /var/lib/apt/lists/*
sudo apt clean
sudo apt update
  • If you know the invalid file, you can just remove it, and update will run faster. Otherwise, you will have to download all again. – thiagofalcao Sep 22 '17 at 17:06
  • I've used your solution, but it still failed with the following error messages: W: archive.canonical.com/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1) E: Failed to fetch download.nus.edu.sg/mirror/ubuntu/dists/xenial-updates/main/… Hash Sum mismatch – Clock ZHONG Oct 10 '17 at 8:44
  • @Clock ZHONG Run sudo rm -rf /var/cache/apt/* in terminal. If it still doesn't work, take a look at this link - askubuntu.com/questions/679233/… . Hope it helps ! – Gautam Vashisht Oct 14 '17 at 7:27
  • @ Gautam Vashisht , thanks! I've fixed this issue by changing the repository server to the US UBUNTU official site. It seems not all Ubuntu's repository servers maintained well. I'm not sure how Ubuntu maintains those free repository servers, but it's obvious that there are some problems in the current management solution. – Clock ZHONG Oct 15 '17 at 8:51
  • Actually, why is this solution ignoring the security warning that this error message describes? why is it secure to just ignore this warning saying that the update source is maliciously modified or insecure? – matt May 26 '18 at 22:40

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