Skip to content

Instantly share code, notes, and snippets.

@akochepasov
Last active February 6, 2026 18:40
Show Gist options
  • Select an option

  • Save akochepasov/fa222c296e1344abdc396156858f05d9 to your computer and use it in GitHub Desktop.

Select an option

Save akochepasov/fa222c296e1344abdc396156858f05d9 to your computer and use it in GitHub Desktop.
debian packages
## Extracts the contents of a the_package.deb package into tmp
dpkg-deb -R the_package.deb tmp
## Find a package for a file
dpkg -S /usr/bin/ssh
# Find a package dependencies
apt-cache depends openssh-client | grep libssl3
# Find all packages dependent on libssl3
apt-cache rdepends libssl3 | grep ssh
## Download python3.10-venv locally
apt-get -d -o dir::cache=`pwd` -o Debug::NoLocking=1 install python3.10-venv
# Clean up the system from the_package
sudo apt purge the_package
dpkg -P the_package
## Check for primary package version
apt-cache policy the_package
## Typical use
apt install the_package.deb
apt remove the_package.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment