dpkg - bunnyamin/bunnix GitHub Wiki

Unpack Debian package files

DPKG

$ dpkg -x <file> /extract/to/directory $ for file_str in ./*; do echo "Processing file: $file_str..."; dpkg -x $file_str ./unpacked;done

AR

For Linux operative systems with no support for dpkg.

  • ar -xv <deb file>
  • x extract
  • v verbose
  • --output=<directory>
  • for file_str in ./package.deb; do if [ "$file_str" != "__unpacked__" ]; then mkdir -p ./unpacked/$file_str && cd ./unpacked/$file_str && echo "Processing file: ../../$file_str" && ar -xv ../../$file_str && cd ../..; fi done
  • Use unxz to extract xz files.
  • Use tar -xf <file> to extract tar files.
⚠️ **GitHub.com Fallback** ⚠️