Skip to content

Instantly share code, notes, and snippets.

@nicokosi
Last active October 13, 2016 11:15
Show Gist options
  • Save nicokosi/5598176 to your computer and use it in GitHub Desktop.
Save nicokosi/5598176 to your computer and use it in GitHub Desktop.
Cheat sheet for Debian Linux package management
# install '.deb' package (local file)
dpkg -i my-package
# list installed packages
dpkg-query -W
# list installed ('ii' marker) and not installed ('un') packages
dpkg -l
# list available packages
apt-cache search $query
# show package details (description, URL, etc.)
apt-cache show $package-name
# install package
apt-get install mypackage
# update local package DB
apt-get update
# upgrade package
apt-get upgrade mypackage
# remove package
apt-get remove mypackage
# remove package and configuration
apt-get purge mypackage
# Show detailed APT config
apt-config dump
# List all configured APT repositories
more /etc/apt/sources.list.d/*.list
# Add an APT repository
sudo add-apt-repository <PPA name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment