2

Why are there so many repeats of getting similar packages during sudo apt update? Is this normal? Previously, I noticed that there were only 5 to 7 Hit or Get in total. Recently, I noticed this update list seemed to have grown longer and longer.

Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease                                                    
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease                                                 
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                                               
Get:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]     
Get:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]     
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [728 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [580 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [285 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [70.9 kB]                                                                                                                          
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [140 kB]                                                                                                                           
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [253 kB]                                                                                                                    
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [209 kB]                                                                                                                       
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [452 kB]                                                                                                                       
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]                                                                                                                 
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,924 B]                                                                                                                 
Get:19 http://archive.ubuntu.com/ubuntu bionic-security/main i386 Packages [368 kB]                                                                                                                               
Get:20 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [502 kB]                                                                                                                              
Get:21 http://archive.ubuntu.com/ubuntu bionic-security/main Translation-en [170 kB]                                                                                                                              
Get:22 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [22.6 kB]                                                                                                                      
Get:23 http://archive.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [10.4 kB]                                                                                                                         
Get:24 http://archive.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [31.7 kB]                                                                                                                         
Get:25 http://archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [6,600 B]                                                                                                                       
Get:26 http://archive.ubuntu.com/ubuntu bionic-security/restricted Translation-en [2,840 B]                                                                                                                       
Get:27 http://archive.ubuntu.com/ubuntu bionic-security/universe i386 Packages [590 kB]                                                                                                                           
Get:28 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [604 kB]                                                                                                                          
Get:29 http://archive.ubuntu.com/ubuntu bionic-security/universe Translation-en [201 kB]                                                                                                                          
Get:30 http://archive.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB]                                                                                                                  
Get:31 http://archive.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [116 kB]                                                                                                                      
Get:32 http://archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]                                                                                                                
Fetched 5,652 kB in 23s (245 kB/s)                                                                                                                                                                                
Reading package lists... Done

Update:

I just ran sudo apt update again. This time, only 8 Hit & Get were involved. Why does it sometime require such a long update while other times require a much shorter update?

Hit:1 http://archive.canonical.com/ubuntu bionic InRelease                                                 
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                                                                                    
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                              
Hit:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease                                                  
Hit:8 http://archive.ubuntu.com/ubuntu bionic-security InRelease                
Fetched 1,310 B in 2s (579 B/s)                      
Reading package lists... Done
Building dependency tree       
Reading state information... Done  
Sun Bear
  • 2,302

2 Answers2

5

This is normal, apt is downloading updated package lists, metadata, icons, translations for each of your configured repositories. “Hit” means a file hasn’t changed since its last download, “Get” means it has and apt has downloaded it.

Your second run only checked the InRelease files; these contain an index, with checksums, of the various other indexes that apt update might download, and allow apt to determine if any have changed compared to what’s currently on your system. If nothing has changed, it doesn’t download anything else. You can see this in your first run too: the first two InRelease files hadn’t changed, so nothing else was downloaded for those repositories.

Stephen Kitt
  • 1,507
2

This is totally normal. What you are seeing in the 'Get' lines is your machine getting a different resource during the repository update process. 'Hit' means no update was necessary

520
  • 141
  • Pls see info in my updated question. Do you know why the next sudo apt update only involved a much shorter update? – Sun Bear Sep 10 '19 at 15:03
  • 3
    @SunBear Because all new information has been already fetched by apt-get. So, there's no new information that is to be fetched by apt, thus shorter output. – Kulfy Sep 10 '19 at 15:10
  • @SunBear What Kulfy said. apt checks the locally stored version of these files against the ones on the server. It will only download if the file on the server is newer than the one you have locally. As you had only just updated the repository information, it didn't have anything it needed to download. – 520 Sep 10 '19 at 16:36