about Grigoris Maravelias
Extracting rpm and deb packages

Extracting rpm and deb packages

[ Information from G-Loaded journal – many thanks! ]

The packages rpm and deb are used mainly by the package managers in order to easilly and successfully install any additional stuff. At the same time rpm and deb packages are also archives (cpio and ar archives respectively) that can be axtracted.

One way is of course to right click on the package and select extract as any nomal archived file (double-click will start the package manager and the installation process, something that we don’t want now!) .

A second way is through the command line:

For rpm (Fedora, RedHat, etc):
rpm2cpio mypackage.rpm | cpio -vid
and for deb (Ubuntu, Debian, etc), which contains three files (debian-binary, control.tar.gz, data.tar.gz – in which we are actually interested in!) :
ar vx mypackage.deb
tar -xzvf data.tar.gz

The -v option is optional, so if used then you get verbose output.

Then you can use the output (found on usr/ folder) as you want – my initial motivation was to to find a library needed for a 32bit program installed on a 64bit machine!.

Leave a Reply

Your email address will not be published. Required fields are marked *