16

When I type in the sudo apt-get update I get this output

Hit:1 http://br.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 https://repo.steampowered.com/steam stable InRelease                     
Get:3 http://br.archive.ubuntu.com/ubuntu focal-updates InRelease [111 kB]     
Hit:4 http://dl.google.com/linux/chrome/deb stable InRelease                   
Get:5 http://br.archive.ubuntu.com/ubuntu focal-backports InRelease [98,3 kB]
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease               
Hit:7 http://ppa.launchpad.net/teejee2008/ppa/ubuntu focal InRelease
Get:8 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [318 kB]
Get:9 http://br.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [190 kB]
Get:10 http://br.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [119 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Ign:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata
Ign:34 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata
Ign:35 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata
Get:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [196 kB]
Err:11 http://br.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata
  File has unexpected size (195784 != 195720). Mirror sync in progress? [IP: 200.236.31.4 80]
  Hashes of expected file:
   - Filesize:195720 [weak]
   - SHA256:620989b440f546d66d39a063c6e8c049e6f716f0da9f510ebf1da727be3f5844
   - SHA1:96786274267a2bfce9c0b3c6bbc7b8e4076d08d8 [weak]
   - MD5Sum:6b22100a971f517dd23973ba9a242c8c [weak]
  Release file created at: Fri, 07 Aug 2020 18:58:05 +0000
Get:34 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [177 kB]
Err:34 http://br.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata
  
Get:35 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2.468 B]
Err:35 http://br.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata
  
Get:36 http://br.archive.ubuntu.com/ubuntu focal-backports/main amd64 c-n-f Metadata [112 B]
Get:37 http://br.archive.ubuntu.com/ubuntu focal-backports/restricted amd64 c-n-f Metadata [116 B]
Get:38 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [3.096 B]
Get:39 http://br.archive.ubuntu.com/ubuntu focal-backports/universe i386 Packages [2.268 B]
Get:40 http://br.archive.ubuntu.com/ubuntu focal-backports/universe Translation-en [1.448 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Ign:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata
Get:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1.972 B]
Err:41 http://br.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata
  File has unexpected size (1976 != 1972). Mirror sync in progress? [IP: 200.236.31.4 80]
  Hashes of expected file:
   - Filesize:1972 [weak]
   - SHA256:3d9adb8ec018eafe9e452377669976073b7e893d89a0664392c1435c2d256b7e
   - SHA1:347c09e2129d07363b358e6459655fa191ce9de8 [weak]
   - MD5Sum:a16154af0d5dc497f1d7d365cbd29897 [weak]
  Release file created at: Fri, 07 Aug 2020 18:58:28 +0000
Fetched 212 kB in 2s (124 kB/s)
Reading package lists... Done
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/main/dep11/Components-amd64.yml.xz  File has unexpected size (195784 != 195720). Mirror sync in progress? [IP: 200.236.31.4 80]
   Hashes of expected file:
    - Filesize:195720 [weak]
    - SHA256:620989b440f546d66d39a063c6e8c049e6f716f0da9f510ebf1da727be3f5844
    - SHA1:96786274267a2bfce9c0b3c6bbc7b8e4076d08d8 [weak]
    - MD5Sum:6b22100a971f517dd23973ba9a242c8c [weak]
   Release file created at: Fri, 07 Aug 2020 18:58:05 +0000
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/universe/dep11/Components-amd64.yml.xz  
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-updates/multiverse/dep11/Components-amd64.yml.xz  
E: Failed to fetch http://br.archive.ubuntu.com/ubuntu/dists/focal-backports/universe/dep11/Components-amd64.yml.xz  File has unexpected size (1976 != 1972). Mirror sync in progress? [IP: 200.236.31.4 80]
   Hashes of expected file:
    - Filesize:1972 [weak]
    - SHA256:3d9adb8ec018eafe9e452377669976073b7e893d89a0664392c1435c2d256b7e
    - SHA1:347c09e2129d07363b358e6459655fa191ce9de8 [weak]
    - MD5Sum:a16154af0d5dc497f1d7d365cbd29897 [weak]
   Release file created at: Fri, 07 Aug 2020 18:58:28 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

I've tried doing sudo rm -rf /var/lib/apt/lists/* but the problem still persists.

7
  • Perhaps a reboot and try again? It appears to me that the first file in question that fails Components-amd64.yml.xz here is 1976 bytes. Direct link here in this directory . It is odd that what is being download is of a different size than the files on the server Aug 7, 2020 at 22:54
  • 1
    Still the same problem Aug 7, 2020 at 23:01
  • 1
    nice! which of the two solutions worked for you?
    – mmttato
    Aug 8, 2020 at 0:13
  • 1
    The "apt-get clean", I guess is a simple line but I didn't see this command in any place, and I'm still a very noob Linux user. Aug 8, 2020 at 0:16
  • 2
    From my understanding of this error, the apt clean didn't fix this, but was merely a matter of chance. The error shows up when the mirrors aren't in sync. Not all mirrors sync at the same time. I strongly suspect that somewhere between the time of questioning and the time they ran the update anew, the mirrors finished syncing. The running of sudo apt clean is just merely coincidental.
    – KGIII
    Aug 9, 2020 at 20:42

8 Answers 8

15

In my case, I had to change the Ubuntu Software Update server from Brazil to the USA, then run:

$ apt-get clean
$ apt-get update

And that worked.

10

The reason this happens is because not all the mirrors get updated at the same time. For a variety of reasons, updates get rolled out on a schedule and can take a few days for all the mirrors to be in sync.

If you see this problem, the best solution is to just take a nap or wait until the following day. If you'd like confirmation, or to see when your mirrors are updated, you can actually just look here. That will show you the status of mirrors, including how far behind they may be in the sync process.

You can also change your mirrors to new ones, which might be a good idea if it's a major security issue that you're updating to fix.

If you decide to change your mirrors, open 'Software & Updates' from your 'Preferences' and the very first tab has a drop down menu labeled 'Download From:' and pick alternative mirrors. If you're curious, it's generally considered best practice to pick the mirrors that are geologically closest to you.

8

apt-get clean worked! Thanks for the help from all of you.

1
  • why did you have to write your own answer and accept it. instead of accepting the one that actually helped you ?
    – Xsmael
    Nov 6, 2023 at 19:27
3

I had the same problem today! (Ubuntu 21.10)
I changed from "Brazil" to "Main Server"
Then typed:

sudo apt clean  
sudo apt update

And now things are working as intended

2

apt-get clean didn't worked for me. Found the solution here: https://askubuntu.com/a/1229971

"Open Software & Updates and change Download from to Main Server"

1

On the top right of the screen a red ! was displayed. When I clicked it a message said there is either a network problem or a problem with the sources and I should click Show updates to update the sources manually or check them. When I clicked Show updates the update manager said the software on my pc is actual. First I thought this is just a temporary problem but a few days later there was the same problem.

KGIII's answer helped me. Thanks! He posted, changing the mirrors could solve the problem. For me it works, with the difference that he posted "it's generally considered best practice to pick the mirrors that are geologically closest to you" and I chose Main server.

Then updates have been downloaded!

Today the same error happened again so I set Server for My Country again!
===========================================================

After that, update download works.

0

I solved this problem with the following code:

sudo dpkg --remove-architecture

or

sudo dpkg --remove-architecture armhf
0

you can add text: deb http://in.archive.ubuntu.com/ubuntu/ or deb http://usa.archive.ubuntu.com/ubuntu/ to modify /etc/apt/sources.list

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .