What is the difference/relation between 'dnf check-updates' and 'dnf list updates'?

What is the difference/relation between yum check-updates and yum list updates?

When use one over the other?

Note Yes I know that dnf should be used, but for research/academic purposes yum is used

# man yum is just a link to dnf-3, so we can’t help you.

Here some explanations:
YumCommands - yum - Trac

Did you install yum separately then?
http://yum.baseurl.org/

1 Like

A quick look at the man page seems to give the explanation:

Check-update
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.

So it seems that check-update is there so you can use it in a script or something where you need a return code depending on whether there are updates available or not.

3 Likes

Also for reference, DNF, the next-generation replacement for YUM — dnf latest documentation

Did you install yum separately then?
http://yum.baseurl.org/

No, It already is available on Fedora Workstation 36.

So it seems that check-update is there so you can use it in a script or something where you need a return code depending on whether there are updates available or not.

Yes, it is a difference, another is that can use --changelogs. BTW seems yum list updates does not return no code. So for script purposes is not useful.

Also for reference, DNF, the next-generation replacement for YUM — dnf latest documentation

Thanks

Thank you to all

It seams not, I’m not agree with this answer.

The man-page it selves says:

yum - redirecting to DNF Command Reference

See also in man-page says:

   • DNF project homepage (https://github.com/rpm-software-management/dnf/)
   • How to report a bug (https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting)
   • YUM project homepage (http://yum.baseurl.org/)

For native yum you have to look on the project homepage, see above.

I change the title to:

What is the difference/relation between ‘dnf check-updates’ and ‘dnf list updates’?