Public domain
List all installed packages
dpkg -l
Number of installed packages
dpkg -l | grep '^ii' | wc -l
Check if a package installed
dpkg -l | grep ssh
List the files installed by a package
dpkg -L openssh-server
Which package installed a file
dpkg -S /usr/lib/sftp-server
Install a Package:
sudo apt-get install nmap
Remove a Package
sudo apt-get remove nmap
Update the Package Index:
apt-get update
Upgrade Packages:
apt-get upgrade
apt-get log file
less /var/log/dpkg.log
BY: Pejman Moghadam
TAG: dpkg, apt
DATE: 2011-12-28 12:25:23