Posts Use rpm2cpio to Extract Files from RPM Packages on CentOS7
Post
Cancel

Use rpm2cpio to Extract Files from RPM Packages on CentOS7

I had needs to confirm certain files or directories are installed from which packages, this is the way to do it and solve my problem. To extract the files from rpm packages, we need to download it first, please refer here: Download rpm packages from repository on CentOS7

Once you have th rpm file, use this command to extract files from rpm package to your local hdd.

1
rpm2cpio myrpmfile.rpm | cpio -idm

rpm2cpio

Now you have all the files from the packages! You can use -idmv to show the extracting process if you want to.

This post is licensed under CC BY 4.0 by the author.