Introduction
In the world of Red Hat-based Linux distributions, such as CentOS and RHEL, package management is a key task to keep the system up-to-date, safe and functional. One of the most used tools for this purpose is YUM, the Yellowdog Update Modified. This package manager allows you to install, update and remove software easily from the command line, automatically solving the dependencies and accessing configured repositories.
What is YUM?
YUM is a high-level package manager working on RPM, the standard package format in Red Hat and its derivatives. Its main function is to read the repository configuration files, solve dependencies and perform operations such as installation, updating and package erasing. Unlike other low-level tools such as rpm, YUM automatically handles the relationships between packages, avoiding conflicts and ensuring that the system remains in a consistent state.
Main characteristics
- Automatic unit resolution.
- Support for multiple simultaneous repositories.
- Complete system update with single command.
- Detailed record of actions carried out in / var / log / yum.log.
Basic commands of YUM
- yum install name _ package: install the specified package.
- yum update: updates all packages installed to their latest versions.
- yum check-update: list the packages that have updates available.
- yum remove name _ package: removes the package and its unnecessary dependencies.
- yum search word: look for packages whose description or name contains the word.
- yum info name _ package: shows detailed information about a package.
Practical examples
- Install Apache web server: sudo yum install httpd
- Update the kernel and other critical components: sudo yum update kernel*
- Remove a package that is no longer needed: sudo yum remove samba*
- List all available updates without applying them: sudo yum check-update
Tips and best practices
- Maintain the configured and up-to-date repositories to avoid resolution failures.
- Use yum clean all regularly to release cache space.
- Check the log file / var / log / yum.log for change audit.
- In production environments, test the updates in a staging environment before applying them to critical servers.
Conclusion
YUM remains a key part in the management of CentOS and RHEL systems, thanks to its ability to manage packages safely and automatically. Knowing their commands and good practices allows administrators to keep their servers up to date, minimize risks and optimize time spent on software management. Dominating YUM is therefore an essential skill for any professional working with Red Hat-based distributions.


