What are rpm packages?
- Software on RHEL is installed using packages in Red Hat Package Manager (RPM) format
- An RPM package contains a compressed archive, as well as package metadata
- In the metadata, package dependencies are identified
- To handle dependency management, RHEL uses repositories for package installation
- If a dependency was found, it is installed automatically from the repository
- Installed packages are registered in the RPM database
Querying RPM packages
- Some commands query(
rpm -q[pafl--scripts--changelog]) the RPM database
rpm -qashows all packages that are currently installedrpm -qf filenameshows from which package filename was installedrpm -qllists files installed from a packagerpm -q --scriptsshows scripts executed while installing the packagerpm -q --changelogshows the change log for a package- Querying package files is also possible
- Add -p to any of the commands above

Extracting RPM packages
- Contents of an RPM package can be extracted to the current directory (without installing).


rpm2cpio mypackage-1.0.rpm | cpio -tvrpm2cpio mypackage-1.0.rpm | cpio -tvwill show the contents of a package
rpm2cpio mypackage-1.0.rpm | cpio -idmvrpm2cpio mypackage-1.0.rpm | cpio -idmvextracts the package contents to the current directory