Score:2

Sudo apt upgrade difference in echo/output explanation

cn flag

I run Ubuntu 20.04 and just Just ran sudo apt update twice posted the output below.

My question:

  • Why are the 2 apt run different? (1 goes to 16 the other to 4)

(FYI: I did a sudo apt upgrade between the two but I cancelled it with Ctrl+C)

blabla@PMQG:~$ sudo apt update
[sudo] password for noob: 
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]    
Hit:2 http://de.archive.ubuntu.com/ubuntu focal InRelease                    
Get:3 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:5 http://de.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [279 kB]
Get:6 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages [356 kB]
Get:7 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [363 kB]
Get:8 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1.135 kB]
Get:9 http://de.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [944 B]
Get:10 http://de.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [8.012 B]
Get:11 http://de.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [11,3 kB]
Get:12 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [38,2 kB]
Get:13 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [675 kB]
Get:14 http://security.ubuntu.com/ubuntu focal-security/universe i386 Packages [532 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [66,3 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Fetched 3.804 kB in 8s (448 kB/s)                                              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.



blabla@PMQG:~$ apt list --upgradable 
Listing... Done
linux-generic-hwe-20.04/focal-updates 5.13.0.25.26~20.04.12 amd64 [upgradable from: 5.11.0.46.51~20.04.23]
linux-headers-generic-hwe-20.04/focal-updates 5.13.0.25.26~20.04.12 amd64 [upgradable from: 5.11.0.46.51~20.04.23]
linux-image-generic-hwe-20.04/focal-updates 5.13.0.25.26~20.04.12 amd64 [upgradable from: 5.11.0.46.51~20.04.23]

blabla@PMQG:~$ sudo apt update
[sudo] password for noob: 
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease             
Hit:2 http://de.archive.ubuntu.com/ubuntu focal InRelease                    
Hit:3 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.




cn flag
(https://askubuntu.com/questions/960575/what-do-hit-and-get-mean-in-the-output-of-apt-get-update) I Found this on GET and HIT, but not sure if I fully Understand. Is there a simpler explanation?
cn flag
@Someone it does on the GET and HIT question. Thats a clear explanation, thank you. But not on the other 2 questions
ru flag
@Noob I'm pretty sure the second one lnked by Someone answers what each bit does. IGN, HIT, and GET are all explained [there](https://askubuntu.com/a/294532/10616) unless you're asking about something else. You're asking two separate questions, also, the second one being "Why are the different apt runs different?"
cn flag
@ThomasWard you are right. im asking the same question twice (my bad). And I didnt know about the 1 question per thread. ill keep that in mind. But yes, my 2nd question is 'why are the different apt runs different'
ru flag
@Noob Then your task is to remove all the 'already answered question' bits and restrict your question to the "Why are the apt runs different?" part only. Because of the rule of one-question-per-thread (this isn't a discussion forum after all);
Artur Meinild avatar
vn flag
This existing question explain the difference, which in turn explains why the output differs as well. [What does 'Ign' , \`Get\` or 'Hit' mean when running an apt-get update?](https://askubuntu.com/questions/294525/what-does-ign-get-or-hit-mean-when-running-an-apt-get-update)
cn flag
@ThomasWard i think i understand, going to read it a few more times. Do i need to delete this thread? and thank you again, for your patience and conduct
cn flag
@ThomasWard seems someone asked the same question [LINK](https://askubuntu.com/questions/1172209/long-list-of-hit-and-get-from-sudo-apt-update)
Someone avatar
my flag
Hello, how are you? Remember me? The link you mentioned in the above comment, is asking the exact same thing. IMO your question should be closed as a duplicate of it. There is no need to have two different questions asking the same thing. Marking your question as a duplicate will just close it. However, I think that your question can be merged with the other one. @ThomasWard can do it. Also, please don't edit your posts just to draw more attention to it. I'm assuming that because you've not added any summary to your latest edits.
cn flag
@Someone ok i will leave this post for 1 more week, for ThomasWard to merge it. After 1 week i will delete this post. (I like to keep everything clean and organized :) )
Someone avatar
my flag
@Noob Noo... Don't delete this post. Just let it as it is. Mods will do the needful
cn flag
@Someone ok, i will just leave it as is then
Someone avatar
my flag
@Noob Good.. I can see that a kernel upgrade is there. Please upgrade it as soon as possible to get the best performance.
Score:1
sa flag

The mirror that you are downloading updates from keeps track of the last time that a user connected to the update server from your Ubuntu. It can make an intelligent guess as to which Ubuntu instance is connected to it by comparing the list of installed software that you are trying to update with lists of installed software saved from Ubuntu users who have downloaded updates from the same mirror. If you connected to the update server recently then it serves you the delta changes from the last time that you connected to that mirror and resynchronized the package index files from their sources instead of making you download all of the package index files from their sources every time as you would have to do if you changed to a different update server.

cn flag
Thank you for your answer. I also noticed different mirrors (servers) have different updates. When I do a `sudo apt update` on my current mirror, I only see 1 available update. But when I change to a different mirror, I see 4 available updates. So this means that the mirrors don't mirror amongst one another?
Someone avatar
my flag
@Noob No generally, mirrors are copy of the Main Server. However, some mirrors may not be up-to-date which leads to the situation you described. Maybe those mirrors are not updated yet? You can check for the latest updates in the Main server . Main server is run by Canonical - the company which owns Ubuntu. It also depends on the repositories in the sources list file. For more information refer to https://askubuntu.com/a/1378188/1460940
cn flag
@Someone wauw! thanks! that cleared it all up! much appreciated!
Someone avatar
my flag
@Noob Awesome! Glad it helped you!
Someone avatar
my flag
@Noob Here is an answer which explains how to properly change mirrors. It may help: https://askubuntu.com/a/1376664/1460940
Score:0
vn flag

To further explain this post: What does Ign , Get or Hit mean when running an apt-get update? (of which I still believe this is Q&A is a duplicate..)

Recap:

  • Hit means apt checked the timestamps on the package lists (Release/InRelease* and Index files), those match and there are no changes.

  • Get means apt checked the timestamps on package lists (Release/InRelease* and Index files), there were changes and those will be downloaded.

So the first time you run sudo apt update, there are changes to the InRelease files for 3 of the 4 repositories (those returning Get in the first 4 lines), as well as the Index files for the underlying components (the last 12 lines).

However, the second time you run sudo apt update, it only Hits the InRelease files, meaning there are no changes to the underlying Index files.

Therefore, apt does not bother to check the underlying Index files again, because it knows there are no changes this time (since all InRelease files returned Hit).

This is further evident by the fact that none of the 12 last lines of the first run contains the focal repo. All subsequent Gets or Hits are from focal-security, focal-updates and focal-backports - only those 3 which returned a Get from the InRelease file.

*: The difference between Release and InRelease files: InRelease files are signed in-line while Release files should have an accompanying Release.gpg file.

cn flag
Thank you for your answer, I wasnt looking for the meaning of HIT/GET. But for an explanation about the differences (as @karel) gave. But I do agree with you that my question is kind of a duplicate, what do you suggest I do?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.