Difference Between “yum update” and “yum upgrade” Commands

RPM-based distributions like CentOS, RHEL, and Fedora provide the yum command for package management. The yum update command is used to get the latest repository information and update packages with this information. The yum upgrade command provides a very similar function by updating the packages but there is a small difference.

Difference Between “yum update” and “yum upgrade”

The yum update command first reads the repository configuration and then connects to the specified repositories in order to get the latest and up-to-date information about packages. The yum update command does remove old packages and install new versions. But during that time some packages become absolute and removed from repositories. The “yum update” command does not remove the absolute packages by default.

The yum upgrade command is the same as the “yum update” command but it also sets the --obsoletes flag implicitly. The –obsoletes flag also enables the removal of the obsolete packages during the update operation.

Leave a Comment