Yum package manager
Overview and essential commands for Red Hat-based systems.
Yum (Yellowdog Updater Modified) is a powerful and user-friendly package manager used in Red Hat-based Linux distributions, including CentOS, Rocky Linux, AlmaLinux, and Fedora. It simplifies software management by automatically resolving dependencies, searching repositories, installing, updating, and removing packages.
Basic Yum commands
The general syntax for Yum commands is:
yum [option] [command] [package_name]
Installing packages
- Install a single package:
yum install package_name - Install multiple packages:
yum install package1 package2 package3 - Install a package from a local
.rpmfile:yum install /path/to/package.rpm
Removing packages
yum remove package_name
or
yum erase package_name
Searching for packages
- Search by package name:
yum list package_name - Search in name and description:
yum search keyword - Find which package provides a specific file:
yum provides filename
Updating the system and packages
- Update all packages on the system:
yum update - Update a specific package:
yum update package_name
Downloading a package without installing it
yumdownloader package_name
Viewing package dependencies
yum deplist package_name
Useful options
--nogpgcheck— disable GPG signature checking (use with caution):yum install package.rpm --nogpgcheck-y— automatically answer "yes" to all prompts:yum update -y
Best practices
- Update the package cache before installing or updating:
yum makecache - Clean the cache:
yum clean all - View operation history:
yum history
Yum remains a reliable tool for CentOS 7, Rocky Linux 8, and AlmaLinux 8. However, on newer versions (Rocky Linux 9, AlmaLinux 9, and above), it is recommended to use the modern successor — DNF.
Help
If you have any questions or need assistance, please contact us through the ticket system — we're always here to help!