How to Extract Contents of an RPM Package
To extract files from an RPM package, one can use the command:
rpm2cpio rpmfile.rpm | cpio -idmv
It does the following:
- first
rpm2cpiocommand converts the rpm package to a cpio archive - then the
cpiocommand:- unpacks the archive (option
-i) - creates a full directory structure (option
-d) - and preservers file modification times (option
-m).
- unpacks the archive (option