yum
Overview
The yum
(Yellowdog Updater Modified) command manages packages in RPM-based Linux systems. It handles package installation, updates, and removal.
Syntax
yum [options] command [package...]
Common Commands
Command | Description |
---|---|
install |
Install packages |
update |
Update packages |
remove |
Remove packages |
search |
Search packages |
info |
Show package info |
list |
List packages |
check-update |
Check updates |
clean |
Clean cache |
groupinstall |
Install group |
groupremove |
Remove group |
history |
Transaction history |
provides |
Find package providing file |
Common Options
Option | Description |
---|---|
-y |
Assume yes |
-q |
Quiet mode |
--nogpgcheck |
Skip GPG check |
--enablerepo |
Enable repository |
--disablerepo |
Disable repository |
--exclude |
Exclude packages |
--downloadonly |
Download only |
--skip-broken |
Skip broken packages |
Key Use Cases
- Package management
- System updates
- Dependency resolution
- Repository management
- System maintenance
Examples with Explanations
Example 1: Install Package
yum install package_name
Install specific package
Example 2: Update System
yum update
Update all packages
Example 3: Search Package
yum search keyword
Search for packages
Common Usage Patterns
System update:
yum check-update && yum update
Group install:
yum groupinstall "Development Tools"
Clean cache:
yum clean all
Security Considerations
- Repository security
- GPG verification
- Root privileges
- Network security
- Version control
Additional Resources
Best Practices
- Regular updates
- Clean cache
- Verify packages
- Backup configuration
- Test updates
Repository Management
- Configuration
- Priorities
- GPG keys
- Mirrors
- Custom repos
Troubleshooting
- Dependency issues
- Repository problems
- Network errors
- Space issues
- Lock files