Extract files from DEB package

Some day ago, I wrote about RPM extraction, today I need content of DEB packcage, on the contrary of rpm systems debian package manager allow to extract natively by this command: #dpkg-deb -x somepackage.i386.deb But my problem is different, I not using Debian sytem, fortunately DEB files are “ar” archives, which contain three files: debian-binary control.tar.gz data.tar.gz first, extract “ar” archive with this simple command: # ar vx somepackage.i386.deb then extract the contents of data.tar.gz using tar: ...

10 November 2009 @ 06:00 · Updated: 30 June 2026 @ 03:28 · leo

Extract files from RPM package

There is no direct RPM option available via rpm command to extract an RPM file. But there is a small utility available called rpm2cpio. It Extract cpio archive from RPM Package Manager (RPM) package. Example extract RPM file using rpm2cpio and cpio command: # rpm2cpio somepackage.x86_64.rpm | cpio -idmv Output of rpm2cpio piped to cpio command with following options: i: Restore archive d: Create leading directories where needed m: Retain previous file modification times when creating files v: Verbose

2 November 2009 @ 04:58 · Updated: 30 June 2026 @ 03:28 · leo