Skip to content
Rashid Azar

Failed to fetch URL Hash Sum mismatch Ubuntu

Linux1 min read

I was facing issues to update ubuntu on my laptop. I was getting below error while update the source list:

1rashid:~$ sudo apt update
2Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
3Hit:2 http://archive.ubuntu.com/ubuntu focal-backports InRelease
4Hit:3 http://archive.ubuntu.com/ubuntu focal-security InRelease
5Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
6Get:5 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [518 kB]
7Err:5 http://archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
8 Hash Sum mismatch
9 Hashes of expected file:
10 - Filesize:518464 [weak]
11 - SHA256:767c31310667191df3d94b67339df2ef4e7806e1cd0332cf1d2dc047528e4d57
12 - SHA1:6e00e38f0806fd0fd9f409775bd0d16fde1ec2f0 [weak]
13 - MD5Sum:965c4f3d64bd0c4b990324733c7b19fc [weak]
14 Hashes of received file:
15 - SHA256:8585d3728be840add1144460d674ebcef997ed5d8cefcf440275cd3a691fc2fe
16 - SHA1:55a505f2494296e81cb39966bbb6409f9f8b26f7 [weak]
17 - MD5Sum:c3c5b6ab7e1fc9e34fb25a1535c04fe1 [weak]
18 - Filesize:518464 [weak]
19 Last modification reported: Sat, 14 Aug 2021 13:04:49 +0000
20 Release file created at: Sat, 14 Aug 2021 14:09:27 +0000
21Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,138 kB]
22Get:7 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [248 kB]
23Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [283 kB]
24Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main DEP-11 48x48 Icons [60.5 kB]
25Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main DEP-11 64x64 Icons [95.0 kB]
26Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [13.9 kB]
27Get:12 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [372 kB]
28Get:13 http://archive.ubuntu.com/ubuntu focal-updates/restricted i386 Packages [19.2 kB]
29Get:14 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [53.7 kB]
30Get:15 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata [456 B]
31Fetched 632 kB in 3s (195 kB/s)
32Reading package lists... Done
33E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/binary-i386/by-hash/SHA256/767c31310667191df3d94b67339df2ef4e7806e1cd0332cf1d2dc047528e4d57 Hash Sum mismatch
34 Hashes of expected file:
35 - Filesize:518464 [weak]
36 - SHA256:767c31310667191df3d94b67339df2ef4e7806e1cd0332cf1d2dc047528e4d57
37 - SHA1:6e00e38f0806fd0fd9f409775bd0d16fde1ec2f0 [weak]
38 - MD5Sum:965c4f3d64bd0c4b990324733c7b19fc [weak]
39 Hashes of received file:
40 - SHA256:8585d3728be840add1144460d674ebcef997ed5d8cefcf440275cd3a691fc2fe
41 - SHA1:55a505f2494296e81cb39966bbb6409f9f8b26f7 [weak]
42 - MD5Sum:c3c5b6ab7e1fc9e34fb25a1535c04fe1 [weak]
43 - Filesize:518464 [weak]
44 Last modification reported: Sat, 14 Aug 2021 13:04:49 +0000
45 Release file created at: Sat, 14 Aug 2021 14:09:27 +0000
46E: Some index files failed to download. They have been ignored, or old ones used instead.

To fix this I executed below commands:

1$ sudo rm -rf /var/lib/apt/lists/*
2$ sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
3$ sudo apt-get update && sudo apt-get upgrade

Ref

© 2021 by Rashid Azar. All rights reserved.