Unlike something like apt, dnf periodically refreshes its caches (I don't know what the condition is off the top of my head). Using just dnf upgrade will either 1) use the current local version of the caches, if it still considers them valid or 2) perform a refresh. Once that happens, it will calculate the upgrade. Adding --refresh forces #2. I usually opt for --refresh just to make sure I have the latest packages.

From: THE HAMMER via WLUG <wlug@lists.wlug.org>
Sent: Friday, May 21, 2021 10:08:57 AM
To: WLUG LIST <wlug@lists.wlug.org>
Cc: THE HAMMER <hammerron@hotmail.com>
Subject: [EXT] [WLUG] Fedora 34 updates
 
I just installed Fedora 34 on a "junk laptop" to play along with.  Looked on line and wound up with a couple different answers, and so perhaps they are all correct.  My question is when I want to update all the packages in the lap top what is the correct/best command?

Also what is the difference between

dnf upgrade

and

dnf upgrade --refresh

Thanks

Ron