package update vs upgrade

Latest response

what is the difference between package update and upgrade.
when i must use yum update and when yum upgrade?


From the man yum page: upgrade - Is the same as the update command with the --obsoletes flag set. See update for more details.

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.

if i like to upgrade from kernel 2.x to kernel 3.x i will use yum upgrade kernel 3.x or yum update --obsoletes kernel 3.x.right?

if i like to upgrade from rhel 7 to 8 then i install from scratch rhel 8 then copy the postconfiguration files from backup.right?

Hi Marius,

Upgrading from one major kernel to the next major kernel version is not possible this way.
Neither yum update, nor yum upgrade will do it ... you would have to download the kernel,
and install it manually. Also, RHEL 8 uses DNF instead of YUM under the hood, and there
dnf update (or yum as a symlink) and dnf upgrade do the same - which is : dnf upgrade. :)


Hi, I mount iso rhel 8 on rhel 7 system: mount -o loop /rhel8.iso /mnt then i create repo in /etc/yum.repos.d to point to /mnt then dnf upgrade.right?

what is the difference between yum list updates and yum check-update? tnx

If you are trying to upgrade from RHEL7 to RHEL8 then you would be best advised to do a fresh install of RHEL8 or failing that use Red Hat's upgrade tool to do it. It might be theoretically possible to use dnf to do the upgrade if you really know what you are doing but you are much more likely to end up with an unbootable mess. Also you can't simply use kernel packages from RHEL8 on RHEL7 because their kernel install processes are different, and even if you fixed that up by hand I suspect inconsistencies in other things may well prevent a successful boot.