You usually don't have all the packages from the repository on your local system but only a subset of them.
yum list updates
lists all packages in the repositories that have updates. This is a superset of the packages on your system that have updates available.
The usual command for checking whether there are updates for the packages on your system is yum check-update
, which has the following description in the man page (emphasis mine):
Implemented so you could know if your machine had any updates
that needed to be applied without running it interactively.
Returns exit value of 100 if there are packages available for
an update. Also returns a list of the packages to be updated
in list format. Returns 0 if no packages are available for
update. Returns 1 if an error occurred. Running in verbose
mode also shows obsoletes.
One interesting difference between yum list obsoletes
and yum check-update
is that the former command also accepts a glob expression to narrow down the list of packages that may be obsoleted by packages in the repositories. yum check-update
does not accept such a glob expression.