For Fedora Workstation 36. About yum (yes I know it is replaced by dnf) - I am using yum for academic purposes.

To accomplish an update of all the packages available in the OS - is used the sudo yum update command - I want to know if is necessary/mandatory execute first the yum check-update command. I know it shows all the new data available for update purposes, but I am not sure if only does that job - I mean:

For example in Ubuntu the following is mandatory

# [Mandatory] Retrieves all the new data available for the OS
sudo apt update
# [Optional]  Shows all the new data available for the OS, 
#             it depends of the previous command execution
     apt list --upgradable  
# [Mandatory] Update all the new data available for the OS,
#             The first command must be executed before.
sudo apt upgrade 

So I am not sure if sudo yum update does two jobs - first retrieve the info about all the new data available and second proceeds to accomplish the update. Therefore consider the 2 following scenarios:

Case 1

sudo yum update

Case 2

     yum check-update
sudo yum update

What is the correct case for Fedora? Case 1 o 2?

Note I am including Ubuntu and apt tags in case Fedora users are using/learning Ubuntu.

3 Answers 3


No, you don’t have to run yum check-update first. Yum (and DNF) will update the metadata if it has expired when running with the update command.

Repository metadata has an expiration time set in in it, which should be reasonable for the repo, so you generally don’t need to run check-update unless you want to just see what might need updating and don’t plan on actually updating.

  • So yum check-update is just like apt list --upgradable right? It only shows what is all the new data available - Of course, doing a simple comparison - Am I correct? Commented May 19, 2022 at 23:41

"yum check-update" is like a dry run, except it does not do anything. It only lists what versions of kernel or packages will be installed post the update.

It can also help resolve issues with access to the repository. So if it is an production server it is better you validate things by running "yum check-update" a day before. If no error, you are most likely to have a smooth error the following day when you actually patch the server.

Cheers !

  • This answer is not adding to the conversation, reading the other posts. Please revise or add new, additional information.
    – number9
    Commented May 25, 2022 at 13:46

Here's how it goes and why the existing replies are not entirely correct.

First of all, yum* commands have long been deprecated since you're working with dnf, not yum.

Secondly, DNF updates its repos automatically after a certain period of time. Normally, it's 3-4 hours but I cannot be sure - someone needs to check the sources!

However! I've had a situation multiple times when I know an update has been released but DNF doesn't see/offer it because the time hasn't come yet.

So, what you're looking for is:

sudo dnf clean expire-cache

Speaking of dnf check-update - this is where the existing answers are correct: this command doesn't update repos, it merely shows what packages can be updated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .