0

I'd like to find out if there are differences between yum update and dnf upgrade. I am using CentOS 7. I haven been using BOTH commands at the same time. And I just tried it again and this is what happened:

yum update

Loaded plugins: fastestmirror, langpacks
adobe-linux-x86_64                                       | 2.9 kB     00:00     
base                                                     | 3.6 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
(1/2): adobe-linux-x86_64/primary_db                       | 2.7 kB   00:00     
(2/2): updates/7/x86_64/primary_db                         | 6.9 MB   00:02

#############################################################

dnf upgrade

Adobe Systems Incorporated                       15 kB/s | 1.9 kB     00:00    
CentOS-7 - Base                                                                                  45 kB/s | 9.5 MB     03:35    5CentOS-7 - Updates                                                                              2.0 MB/s | 9.4 MB     00:04    
CentOS-7 - Extras                                                                               1.2 MB/s | 929 kB     00:00    
Using metadata from Tue Apr 10 16:22:39 2018
Dependencies resolved.
Nothing to do.

To me it seems they are showing different updates. But I could be wrong.

muru
  • 72,889
Denny
  • 241
  • What are you expecting? Neither is offering any new packages to update. They should be the equivalent command. You just went out of your way and installed dnf on CentOS before it migrated there from Fedora. – Aaron D. Marasco Apr 11 '18 at 00:01
  • Thank you Aaron. One of the reasons that I installed dnf was because I was told that yum is going outdated, and I should start using dnf. Now I have been curious which one actually shows a better updating results. - Denny – Denny Apr 11 '18 at 00:13
  • First -- "I haven_'t_ been" or "I have[n] been"? – Rich Apr 11 '18 at 01:14
  • 1
    Second, yum will not go away while CentOS 7 is still current. The earliest you'll see it go away and be superseded by dnf is with RHEL8/CentOS8. – Rich Apr 11 '18 at 01:15
  • 2
    Please read these https://superuser.com/questions/433375/what-is-the-technical-differences-between-update-and-upgrade-with-yum https://unix.stackexchange.com/questions/211291/yum-vs-dnf-changed-in-fedora-22 – Dipankar Nalui Apr 11 '18 at 01:57

1 Answers1

2

You should first run update, then upgrade.

Read Updating Packages from the Command Line with yum

What is the technical differences between “update” and “upgrade” with yum?

update:

If run without any packages, update will update every currently installed package. If one or more packages or package globs are specified, Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. […]

If […] the --obsoletes flag is present yum will include package obsoletes in its calculations - this makes it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9.

upgrade:

Is the same as the update command with the --obsoletes flag set.

In CentOS, what is the difference between yum update and yum upgrade?

Yum vs DNF

Compared to Yum, DNF offers:

  1. Better dependency management
  2. Support Extensions other than Python
  3. Documented API
  4. Lower memory usage
  5. Less automatic synchronization of metadata with repositories, a process that users often complain "happens too often and takes too much time."

See Will DNF Replace Yum?