YUM (Yellowdog Updater Modified) — Package Management for Legacy RHEL Systems¶
YUM (Yellowdog Updater Modified) is the traditional package manager used by older versions of Red Hat Enterprise Linux (RHEL), CentOS, Oracle Linux, and other RPM-based Linux distributions. Although modern distributions use DNF as the default package manager, YUM remains important because many enterprise environments continue to run legacy Linux servers. Understanding YUM is essential for maintaining older production systems and supporting enterprise infrastructure.
Learning Path¶
Course Progress
What You'll Learn¶
After completing this lesson, you'll be able to:
- Understand YUM
- Install and remove packages
- Update software
- Search package repositories
- Manage repositories
- View package history
- Compare YUM and DNF
- Maintain legacy Linux systems
Prerequisites¶
Complete:
- Module 1 – Linux Fundamentals
- Module 2 – Linux Command Line Essentials
- Module 3 – Text Processing
- Module 4 – File Management and Permissions
- Module 5 – Users and Groups
- Module 6 – Process Management
- Module 7 Lessons 1–2
Why Learn YUM?¶
Although DNF has replaced YUM on modern systems, many organizations still run:
- RHEL 7
- CentOS 7
- Oracle Linux 7
- Legacy enterprise servers
As a Linux administrator or DevOps engineer, you'll often encounter environments where YUM is still the standard package manager.
What is YUM?¶
YUM stands for:
Yellowdog Updater Modified
It is a package manager for RPM-based Linux distributions.
YUM works with:
packages and automatically:
- Resolves dependencies
- Downloads packages
- Installs software
- Removes packages
- Updates software
Package Management Workflow¶
YUM Command
│
▼
Repository
│
▼
Download Package
│
▼
Resolve Dependencies
│
▼
Install Package
│
▼
Ready to Use
Check for Available Updates¶
This refreshes package metadata and displays available package updates.
Install a Package¶
Install NGINX.
Install multiple packages.
YUM automatically installs required dependencies.
Update Packages¶
Update all installed packages.
Update a specific package.
Remove a Package¶
Unused dependencies may remain and should be reviewed separately.
Search for Packages¶
Example:
View Package Information¶
Displays:
- Version
- Repository
- Description
- Size
- Architecture
List Installed Packages¶
Find a package.
List Enabled Repositories¶
Example:
Clean Package Cache¶
Remove cached packages.
Remove all cached metadata and packages.
Rebuild the cache.
View Package History¶
Display transaction history.
View a specific transaction.
Undo a transaction.
Common Commands¶
Install package.
Update packages.
Remove package.
Search package.
Package information.
List repositories.
Real Production Examples¶
Install Git.
Install Apache.
Update production server.
Install Docker.
Production Perspective¶
YUM is commonly found on:
- RHEL 7
- CentOS 7
- Oracle Linux 7
- Older enterprise Linux servers
- Legacy production environments
Although DNF is now the default package manager on newer releases, many enterprise systems continue to rely on YUM.
Hands-on Lab¶
Task 1¶
List enabled repositories.
Task 2¶
Search for Git.
Task 3¶
View package details.
Task 4¶
Check for updates.
Task 5¶
Install Git (if not already installed).
Task 6¶
Verify installation.
Task 7¶
View package history.
Task 8¶
Clean the package cache.
Command Deep Dive¶
| Command | Purpose | Production Example |
|---|---|---|
yum install | Install packages | Software deployment |
yum update | Update packages | Security patching |
yum remove | Remove packages | Cleanup |
yum search | Search packages | Package discovery |
yum info | Package details | Verification |
yum repolist | View repositories | Repository management |
yum history | View transactions | Auditing |
yum clean all | Clear cache | Maintenance |
YUM vs DNF¶
| Feature | YUM | DNF |
|---|---|---|
| Default On | RHEL/CentOS 7 | RHEL/Rocky/AlmaLinux 8+ and Fedora |
| Package Format | .rpm | .rpm |
| Dependency Resolution | Good | Improved |
| Performance | Good | Faster and more efficient |
| Transaction History | ✅ | ✅ |
| Active Development | Maintenance only | Active development |
Production Troubleshooting Scenario¶
Scenario
A system administrator attempts to install Docker.
Error:
Investigation:
The required repository is not enabled.
After enabling the correct repository:
The installation completes successfully.
Best Practices¶
- Apply package updates regularly.
- Use only trusted repositories.
- Clean the package cache periodically.
- Review package dependencies before installation.
- Plan migrations from YUM-based systems to DNF-supported platforms where appropriate.
Common Mistakes¶
❌ Using outdated repositories.
✅ Avoid using outdated repositories when a safer approach exists.
❌ Ignoring security updates.
✅ Always review security updates.
❌ Installing packages from untrusted sources.
✅ Avoid this mistake: installing packages from untrusted sources.
❌ Assuming every RPM-based distribution uses DNF.
✅ Older enterprise systems may still rely on YUM.
Interview Questions¶
Beginner¶
- What does YUM stand for?
- Which Linux distributions traditionally use YUM?
- Which command installs a package?
- How do you search for a package?
Intermediate¶
- What is the difference between
yum updateandyum check-update? - How do you view enabled repositories?
- How do you view package history?
- How do you remove a package?
Architect Level¶
- Why is YUM still relevant in enterprise environments?
- How would you manage package updates across legacy RHEL servers?
- What factors would you consider when migrating from YUM to DNF?
Summary¶
In this lesson, you learned:
- YUM package management
- Package installation
- Package updates
- Repository management
- Package history
- Cache management
- Legacy enterprise Linux administration
YUM remains an important tool for maintaining older RPM-based Linux systems. While DNF has become the standard package manager on modern Red Hat-based distributions, understanding YUM enables you to support legacy enterprise environments and smoothly transition to newer platforms.
Key Takeaways¶
- YUM is the traditional package manager for older RPM-based Linux distributions.
- Use
yum installto install software. - Use
yum updateto apply package updates. - Use
yum searchandyum infoto discover packages. - Use
yum repolistto view configured repositories. - Many enterprise environments continue to use YUM on legacy systems.
What's Next?¶
RPM (Red Hat Package Manager) — Managing RPM Packages in Linux
You'll explore:
- What RPM is
- Installing local RPM packages
- Querying installed packages
- Verifying package integrity
- Viewing package contents
- Differences between RPM and YUM/DNF
- Production package management using RPM
Understanding RPM will help you work directly with package files and troubleshoot package-related issues on RPM-based Linux systems.