Extracting the contents (files) from a Debian package

Today I was forced to manually extract the contents of a debian package which could not be installed the “normal” way using dpkg due to broken dependencies.

Afer some googling, I found the following command line on Vijay’s blog:

dpkg-deb -x {deb-package name} /var/tmp

which extacts the files from “deb-package-name” to a dir of my choosing to /var/tmp.

From there, I could install them by tar pipe (after checking the directory contents first of course, as to not overwrite anything important using

cd /var/tmp/dir; tar -cvpf - . | tar -C / -xpf -

I hope this may help someone stuck in the same hole in the future. Thanks to Vijay for the original posting!

Leave a Reply

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