To extract files from a Debian package use dpkg-deb command

Fig.02: To extract files from a Debian package use dpkg-deb command

Fig.02: To extract files from a Debian package use dpkg-deb command

To extract files from a Debian package use dpkg-deb command as follows:
$ dpkg-deb -vx ./file.deb /path/to/dir/
For examples, I have a file named htop_2.0.1-1ubuntu1_amd64.deb:
$ ls
Sample outputs:

htop_2.0.1-1ubuntu1_amd64.deb

To extract type:
$ dpkg-deb -xv htop_2.0.1-1ubuntu1_amd64.deb .
Sample outputs:

./
./usr/
./usr/bin/
./usr/bin/htop
./usr/share/
./usr/share/pixmaps/
./usr/share/pixmaps/htop.png
./usr/share/applications/
./usr/share/applications/htop.desktop
./usr/share/doc/
./usr/share/doc/htop/
./usr/share/doc/htop/AUTHORS
./usr/share/doc/htop/copyright
./usr/share/doc/htop/changelog.Debian.gz
./usr/share/doc/htop/README
./usr/share/man/
./usr/share/man/man1/
./usr/share/man/man1/htop.1.gz

You can now view or see files in the current dirctory:
$ ls
htop_2.0.1-1ubuntu1_amd64.deb usr
$ cd usr/bin/
$ ls
htop
$ file htop
htop: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=165c78eba08c4884f2af3881cf7999ebd0ed587f, stripped
$

Examples and usage: How to extract a .deb file without opening it on Debian or Ubuntu Linux