rpm
Overview
The rpm
(RPM Package Manager) command is a low-level package manager for RPM-based Linux distributions. It handles individual package operations without managing dependencies.
Syntax
rpm [options] [package...]
Common Options
Option | Description |
---|---|
-i |
Install package |
-U |
Upgrade package |
-e |
Erase package |
-q |
Query package |
-V |
Verify package |
-F |
Freshen package |
--nodeps |
Ignore dependencies |
--force |
Force operation |
--test |
Test only |
--rebuild |
Rebuild package |
--rebuilddb |
Rebuild database |
--checksig |
Check signature |
Query Options
Option | Description |
---|---|
-qa |
Query all |
-qi |
Package info |
-ql |
List files |
-qf |
File owner |
-qp |
Query package file |
-qR |
Requirements |
-qc |
Config files |
-qd |
Documentation |
Key Use Cases
- Package installation
- Package queries
- Package verification
- Database maintenance
- System verification
Examples with Explanations
Example 1: Install Package
rpm -ivh package.rpm
Install with verbose and hash progress
Example 2: Query Package
rpm -qi package_name
Show package information
Example 3: Verify Package
rpm -V package_name
Verify package files
Common Usage Patterns
List installed:
rpm -qa
Find owner:
rpm -qf /path/to/file
Show dependencies:
rpm -qR package_name
Security Considerations
- Package verification
- GPG signatures
- Root privileges
- System integrity
- Dependencies
Additional Resources
Best Practices
- Verify packages
- Check signatures
- Backup database
- Document changes
- Test installation
Package Information
- Version
- Release
- Architecture
- Dependencies
- Changelog
Troubleshooting
- Dependencies
- Database issues
- Conflicts
- Space problems
- Verification errors