CyberKeeda In Social Media
Showing posts with label DPKG. Show all posts
Showing posts with label DPKG. Show all posts

DPKG Cheat Sheet


DPKG [ dpkg ] is a traditional yet powerful CLI tool for the debian based Linux Distribution.
It is used to install/manage individual packages.

Here are some useful dpkg commands which you can use as a cheat code.




SyntaxDescriptionExample
dpkg -i {.deb package}Install the packagedpkg -i zip_virtualbox-5.amd64.deb
dpkg -i {.deb package}Upgrade package if it is installed else install a fresh copy of packagedpkg -i virtualbox-5.amd64.deb
dpkg -R {Directory-name}Install all packages recursively from directorydpkg -R /tmp/downloads
dpkg -r {package}Remove/Delete an installed package except configuration filesdpkg -r zip
dpkg -P {package}Remove/Delete everything including configuration filesdpkg -P apache-perl
dpkg -lList all installed packages, along with package version and short descriptiondpkg -l
dokg -l | less
dpkg -l '*apache*'
dpkg -l | grep -i 'sudo'
dpkg -l {package}List individual installed packages, along with package version and short descriptiondpkg -l apache-perl
dpkg -L {package}Find out files are provided by the installed package i.e. list where files were installeddpkg -L apache-perl
dpkg -L perl
dpkg -c {.Deb package}List files provided (or owned) by the package i.e. List all files inside debian .deb package file, very useful to find where files would be installeddpkg -c virtualbox-5.amd64.deb
dpkg -S {/path/to/file}Find what package owns the file i.e. find out what package does file belongdpkg -S /bin/netstat
dpkg -S /sbin/ippool
dpkg -p {package}Display details about package package group, version, maintainer, Architecture, display depends packages, description etcdpkg -p lsof
dpkg -s {package} | grep StatusFind out if Debian package is installed or not (status)dpkg -s lsof | grep Status
Read more ...
Designed By Jackuna