0

The document states:

yum list obsoletes

List the packages installed on the system that are obsoleted by packages in any yum repository listed in the config file.

yum list updates

List all packages with updates available in the yum repositories.

As I understand, if a package has update available, it is obsolete, right? So what's the differences between them?

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.