Thursday, January 05, 2006

How to extract files from rpm and deb packages

* rpm package can be extracted by issuing this command at the command line.

$rpm2cpio {rpm-package name} | cpio -idv

* deb packages can be extracted by issuing this command at the command line.

$dpkg-deb -x {deb-package name} {target directory}

Enjoy..

6 comments:

Anonymous said...

you can extract debian package like this also

for displaying contents
ar tv somepackage.deb

extracting files of debian package
ar xv somepackage.deb

Unknown said...

thanks

Unknown said...

Thanks a lot!!!

Anonymous said...

That helped me a lot! Extracting a file from a package is much less painfull than recovering ist from ext3 (after having deleted it accidentally)! :-)

DMA Writer said...

Great tips vijay, thanks.

Anonymous said...

Thanks. This blog post might be 5 years old, but it helped me!