debian - bunnyamin/bunnix GitHub Wiki

Package management

apt install --only-upgrade <package name>

  • Interactive interface aptitude

  • Find package aptitude search <name>

  • Install package apt install <name>

  • Reinstall package aptitude reinstall <name>

  • Install local package dpkg -i package.deb

    • If the installation raises dependency errors then run apt-get install -f.
  • Remove package apt remove <name>

  • Remove package with its dependencies apt autoremove <name>

  • What packages are upgradable? apt list --upgradable

  • apt-get --purge remove <package> -y

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** ⚠️