Manually Unpack an RPM File


Problem: How can I unpack an .rpm file without installing it.

Solution 1: Install and use rpm2cpio.

Solution 2: Install the .rpm into a non-standard location and then Grovel out the bits you need. Something like this:

    rpm -ivh --nodeps --relocate /=targetdir --root=targetdir package.rpm

...should leave files each in their /targetdir/normal/locations, and will update the RPM database located in /targetdir/var/rpm instead of the usual one in /var/rpm.

Solution 3: 7-zip is open source and includes support for browsing .rpm files. Requires that there are MS-Windows nearby. There is also a p7zip, which is a port of the command-line portion of 7-zip to POSIXish systems.


date: 03/14/2007