Checking for and Updating Software Packages
Yum checks whether your system has any updates that wait to be applied. You can list the software packages that need to be updated and update them as a whole, or you can update a selected individual package.
Checking for Updates
To see which installed packages on your system have updates available, run the following command:
yum check-upd ate
Example command output:
# yum check-update Loaded plugins: langpacks, product-id, subscription-manager Updating Red Hat repositories. INFO:rhsm-app.repolib:repos updated: 0 PackageKit.x86_64 0.5.8-2.el6 rhel PackageKit-glib.x86_64 0.5.8-2.el6 rhel PackageKit-yum.x86_64 0.5.8-2.el6 rhel PackageKit-yum-plugin.x86_64 0.5.8-2.el6 rhel glibc.x86_64 2.11.90-20.el6 rhel glibc-common.x86_64 2.10.90-22 rhel kernel.x86_64 2.6.31-14.el6 rhel rpm.x86_64 4.7.1-5.el6 rhel rpm-libs.x86_64 4.7.1-5.el6 rhel rpm-python.x86_64 4.7.1-5.el6 rhel yum.noarch 3.2.24-4.el6 rhel
Updating Software Packages
To update a single package, run the following command as the root user:
yum update package_name
For example, to update the rpm package, run the yum update rpm command.
# yum update rpm Loaded plugins: langpacks, product-id, subscription-manager Updating EulerOS repositories. INFO:rhsm-app.repolib:repos updated: 0 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package rpm.x86_64 0:4.11.1-3.el7 will be updated --> Processing Dependency: rpm = 4.11.1-3.el7 for package: rpm-libs-4.11.1-3.el7.x86_64 --> Processing Dependency: rpm = 4.11.1-3.el7 for package: rpm-python-4.11.1-3.el7.x86_64 --> Processing Dependency: rpm = 4.11.1-3.el7 for package: rpm-build-4.11.1-3.el7.x86_64 ---> Package rpm.x86_64 0:4.11.2-2.el7 will be an update --> Running transaction check ... --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Updating: rpm x86_64 4.11.2-2.el7 rhel 1.1 M Updating for dependencies: rpm-build x86_64 4.11.2-2.el7 rhel 139 k rpm-build-libs x86_64 4.11.2-2.el7 rhel 98 k rpm-libs x86_64 4.11.2-2.el7 rhel 261 k rpm-python x86_64 4.11.2-2.el7 rhel 74 k Transaction Summary ============================================================================= Upgrade 1 Package (+4 Dependent packages) Total size: 1.7 M Is this ok [y/d/N]:
Similarly, it is possible to update a software package group by running the following command as the root user:
yum group update group_name
Updating All Software Packages and Their Dependencies
To update all software packages and their dependencies, run the following command as the root user:
yum update