title: Hash sum mismatch when apt-get update Ubuntu 20.04 VM with Multipass
body: <p>My issue is the following:</p>
  <p>I start a new multipass VM which is Ubuntu 20.04 version (I do not specify it, just launch).
  First command in my new VM is:</p>
  <p><code>sudo apt-get update</code></p>
  <p>Where I already have some error:</p>
  <pre><code>Err:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
    Hash Sum mismatch
    Hashes of expected file:
     - Filesize:1291458 [weak]
     - SHA256:407e1e5f8188d9a38dec308c87203aadb16cb4ac173b729005525c4d824317c9
     - SHA1:47f50537ae094c725a60e90bf5e72d563a73abb2 [weak]
     - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
    Hashes of received file:
     - SHA256:fc9c8ae3385f3b2cdb7c52c8e4ee5fa5074c843155b7ce4786b3ce3c97fe8c3f
     - SHA1:59b7721865c7a9c1b313ce11f11aefa4c7951fd4 [weak]
     - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
     - Filesize:1291458 [weak]
    Last modification reported: Mon, 28 Sep 2020 16:55:59 +0000
    Release file created at: Tue, 29 Sep 2020 10:33:40 +0000
  Get:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en [69.3 kB]
  Err:7 http://security.ubuntu.com/ubuntu focal-security/main Translation-en
  Err:5 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
    Hash Sum mismatch
    Hashes of expected file:
     - Filesize:8627544 [weak]
     - SHA256:46a746dac789bd9537aca54db1680b9dff51c248153111350382199d7d96b9d1
     - SHA1:7bce310e1f03066e04653926de275118ec09b4d9 [weak]
     - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
    Hashes of received file:
     - SHA256:b2f7c8b1b81060721c7f414843b41eda6760b7814fddeefd5abbf9f2bd4a9fd0
     - SHA1:b07e3465964e50b87630eea2c05faff5253efa0d [weak]
     - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
     - Filesize:8627544 [weak]
    Last modification reported: Thu, 23 Apr 2020 17:34:17 +0000
    Release file created at: Thu, 23 Apr 2020 17:33:17 +0000
  Get:17 http://archive.ubuntu.com/ubuntu focal/universe Translation-en [5124 kB]
  Err:17 http://archive.ubuntu.com/ubuntu focal/universe Translation-en
  Get:18 http://archive.ubuntu.com/ubuntu focal/universe amd64 c-n-f Metadata [265 kB]
  Get:19 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
  Get:20 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en [104 kB]
  Err:20 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en
  Get:21 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 c-n-f Metadata [9136 B]
  Get:22 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [375 kB]
  Err:22 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
    Hash Sum mismatch
    Hashes of expected file:
     - Filesize:374700 [weak]
     - SHA256:35c0b5b9cdd324a81b1ee2c31610ca9c81779dd42df1393fcc1013a877a7f01c
     - SHA1:380d462e7356a2ce3e1598f4588a5e5ff0afadff [weak]
     - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
    Hashes of received file:
     - SHA256:6d8b94194f56ad754d1e2b04dbaa421c81a6b539bc045713b6ad0a0d40ffd340
     - SHA1:be4ec3facb19f7272637f36337a050e5826335a3 [weak]
     - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
     - Filesize:374700 [weak]
    Last modification reported: Tue, 29 Sep 2020 07:15:53 +0000
    Release file created at: Tue, 29 Sep 2020 10:33:56 +0000
  Get:23 http://archive.ubuntu.com/ubuntu focal-updates/main Translation-en [142 kB]
  Get:24 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [9876 B]
  Get:25 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [43.6 kB]
  Get:26 http://archive.ubuntu.com/ubuntu focal-updates/restricted Translation-en [10.8 kB]
  Get:27 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [175 kB]
  Get:28 http://archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [92.7 kB]
  Get:29 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [5952 B]
  Get:30 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [11.6 kB]
  Get:31 http://archive.ubuntu.com/ubuntu focal-updates/multiverse Translation-en [3892 B]
  Get:32 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata [480 B]
  Get:33 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [112 B]
  Get:34 http://archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
  Get:35 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [3088 B]
  Get:36 http://archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [1448 B]
  Get:37 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 c-n-f Metadata [224 B]
  Get:38 http://archive.ubuntu.com/ubuntu focal-backports/multiverse amd64 c-n-f Metadata [116 B]
  Fetched 15.9 MB in 11s (1399 kB/s)
  Reading package lists... Done
  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/binary-amd64/by-hash/SHA256/46a746dac789bd9537aca54db1680b9dff51c248153111350382199d7d96b9d1  Hash Sum mismatch
     Hashes of expected file:
      - Filesize:8627544 [weak]
      - SHA256:46a746dac789bd9537aca54db1680b9dff51c248153111350382199d7d96b9d1
      - SHA1:7bce310e1f03066e04653926de275118ec09b4d9 [weak]
      - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
     Hashes of received file:
      - SHA256:b2f7c8b1b81060721c7f414843b41eda6760b7814fddeefd5abbf9f2bd4a9fd0
      - SHA1:b07e3465964e50b87630eea2c05faff5253efa0d [weak]
      - MD5Sum:bc50840f4e1bbb64fb3ee6e8a351d744 [weak]
      - Filesize:8627544 [weak]
     Last modification reported: Thu, 23 Apr 2020 17:34:17 +0000
     Release file created at: Thu, 23 Apr 2020 17:33:17 +0000
  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/universe/i18n/by-hash/SHA256/a9c6ca6ce2913776bf753ae5132c7814139880784e98672525b4059c61f209dd
  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/i18n/by-hash/SHA256/224cafd684a26e8bce3dfca4daf33b853c9273d13e4ada6161ce9ef38f1a567c
  E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/binary-amd64/by-hash/SHA256/35c0b5b9cdd324a81b1ee2c31610ca9c81779dd42df1393fcc1013a877a7f01c  Hash Sum mismatch
     Hashes of expected file:
      - Filesize:374700 [weak]
      - SHA256:35c0b5b9cdd324a81b1ee2c31610ca9c81779dd42df1393fcc1013a877a7f01c
      - SHA1:380d462e7356a2ce3e1598f4588a5e5ff0afadff [weak]
      - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
     Hashes of received file:
      - SHA256:6d8b94194f56ad754d1e2b04dbaa421c81a6b539bc045713b6ad0a0d40ffd340
      - SHA1:be4ec3facb19f7272637f36337a050e5826335a3 [weak]
      - MD5Sum:73c1f287aab2928e8db81a62677faea6 [weak]
      - Filesize:374700 [weak]
     Last modification reported: Tue, 29 Sep 2020 07:15:53 +0000
     Release file created at: Tue, 29 Sep 2020 10:33:56 +0000
  E: Failed to fetch store:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_focal-security_main_binary-amd64_Packages.xz  Hash Sum mismatch
     Hashes of expected file:
      - Filesize:1291458 [weak]
      - SHA256:407e1e5f8188d9a38dec308c87203aadb16cb4ac173b729005525c4d824317c9
      - SHA1:47f50537ae094c725a60e90bf5e72d563a73abb2 [weak]
      - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
     Hashes of received file:
      - SHA256:fc9c8ae3385f3b2cdb7c52c8e4ee5fa5074c843155b7ce4786b3ce3c97fe8c3f
      - SHA1:59b7721865c7a9c1b313ce11f11aefa4c7951fd4 [weak]
      - MD5Sum:05500c05300ff2f3be66040cd9d4c24b [weak]
      - Filesize:1291458 [weak]
     Last modification reported: Mon, 28 Sep 2020 16:55:59 +0000
     Release file created at: Tue, 29 Sep 2020 10:33:40 +0000
  E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/main/i18n/by-hash/SHA256/66c9979e0ab12165a3ab86f426e3e910d52933bce60ab14fa80a596e1733b0b3
  E: Some index files failed to download. They have been ignored, or old ones used instead.
  </code></pre>
  <p>I have tried the some solution what I had found on the web but none of them worked.</p>
  <p>Solution 1:</p>
  <pre><code>sudo rm -rf /var/lib/apt/lists/*
  sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
  sudo apt-get update &amp;&amp; sudo apt-get upgrade
  </code></pre>
  <p>Solution 2</p>
  <pre><code>sudo rm -rvf /var/lib/apt/lists/*
  echo &quot;APT::Cache-Limit &quot;100000000&quot;;&quot; &gt;&gt; /etc/apt/apt.conf.d/70debconf
  </code></pre>
  <p>Solution 3</p>
  <pre><code>sudo rm -rvf /var/lib/apt/lists/* 
  &amp;&amp; sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad 
  &amp;&amp; sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status 
  &amp;&amp; sudo apt-get update
  </code></pre>
  <p>Solution 4</p>
  <pre><code>sudo apt-get autoclean &amp;&amp; sudo apt-get autoremove -y &amp;&amp; sudo apt-get update
  </code></pre>
  <p>Solution 5</p>
  <pre><code>sudo rm -rf /var/lib/apt/lists
  sudo apt-get clean
  sudo apt-get update
  </code></pre>
  <p>I also tried to add Ubuntu keyserver:</p>
  <pre><code>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192
  </code></pre>
  <p>Here is my source.list</p>
  <pre><code>deb http://archive.ubuntu.com/ubuntu focal-updates main restricted
  deb http://archive.ubuntu.com/ubuntu focal universe
  deb http://archive.ubuntu.com/ubuntu focal-updates universe
  deb http://archive.ubuntu.com/ubuntu focal multiverse
  deb http://archive.ubuntu.com/ubuntu focal-updates multiverse
  deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  deb http://security.ubuntu.com/ubuntu focal-security main restricted
  deb http://security.ubuntu.com/ubuntu focal-security universe
  deb http://security.ubuntu.com/ubuntu focal-security multiverse
  </code></pre>
  <p>I would appreciate any suggestion!
  Thanks</p>
  <p>ps: on my WSL2 everything works fine.</p>