Here: apt-get update updates all the packages? was a good question that IMO was neither a duplicate question nor sufficiently clearly answered... So let me guess the answer & perhaps someone can confirm or not. I suspect apt/apt-get update (a) reads (eg with dpkg --get-selections or --list) the list of installed items on the user's system, & then (b) conducts a search of the repo(s) the user has nominated in the 'sources' file(s) - looking for, & downloading the details of, just those items corresponding to list (a) where the repo has a more recent version. Of course, it would not be able to find items that were not on the repo eg where the user has installed from somewhere else.
1 Answers
apt-get update
only updates your software lists, ie. packages that should be available and can be downloaded, are the latest etc. It does NO upgrades of packages at all; as upgrade
, full-upgrade
& dist-upgrade
do that role.
Yes apt-get update
is limited to sources found in /etc/apt/sources.list
& files within /etc/apt/sources.list.d/
but it does not upgrade any packages. apt-get update
also does not look at whatever packages you have installed; it's only touching software lists of what's available.
If you're using a badly outdated mirror; which can lead to package problems, it won't know or check for that (the output from the apt-get update
can be useful to check https://launchpad.net/ubuntu/+archivemirrors yourself for those problems).
From man apt-get
update update is used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in /etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the Packages.gz files, so that information about new and updated packages is available. An update should always be performed before an upgrade or dist-upgrade. Please be aware that the overall progress meter will be incorrect as the size of the package files cannot be known in advance.
Note: This was copied from my 20.04 system, if you use man apt-get
on your own box you'll see the reference manual page that perfectly matches your release.

- 30,396
apt-get update
only updates your software lists, ie. packages that should be available and can be downloaded, are the latest etc. It does NO upgrades of packages at all; as upgrade, full-upgrade & dist-upgrade do that role. Yesapt-get update
is limited to sources found in/etc/apt/sources.list
& files within/etc/apt/sources.list.d/
but it does not upgrade any packages.apt-get update
also does not look at whatever packages you have installed; it's only touching software lists of what's available. – guiverc Feb 16 '20 at 06:05apt install new-program
and it knows it's available too, ie. it isn't limited to whatever is pre-installed, and updates all software lists found in your sources.list files.apt-get
doesn't look at any upgrades available, it doesn't care as it's not it's job.apt
however does look & provides notice of whatever upgrades are available (apt update
still doesn't really take longer, as it can do multiple things in parallel better thanapt-get
did, this extra task it performs shouldn't take longer - results however can vary) – guiverc Feb 16 '20 at 11:37