|
Syntax
|
<th>
<strong>Description</strong>
</th>
<th>
<strong>Example</strong>
</th>
|
dpkg -i {.deb package}
|
<td>
Install the package
</td>
<td>
dpkg -i zip_2.31-3_i386.deb
</td>
|
dpkg -i {.deb package}
|
<td>
Upgrade package if it is installed else install a fresh copy of package
</td>
<td>
dpkg -i zip_2.31-3_i386.deb
</td>
|
dpkg -R {Directory-name}
|
<td>
Install all packages recursively from directory
</td>
<td>
dpkg -R /tmp/downloads
</td>
|
dpkg -r {package}
|
<td>
Remove/Delete an installed package except configuration files
</td>
<td>
dpkg -r zip
</td>
|
dpkg -P {package}
|
<td>
Remove/Delete everything including configuration files
</td>
<td>
dpkg -P apache-perl
</td>
|
dpkg -l
|
<td>
List all installed packages, along with package version and short description
</td>
<td>
dpkg -l<br /> dokg -l | less<br /> dpkg -l ‘*apache*’<br /> dpkg -l | grep -i ‘sudo’
</td>
|
dpkg -l {package}
|
<td>
List individual installed packages, along with package version and short description
</td>
<td>
dpkg -l apache-perl
</td>
|
dpkg -L {package}
|
<td>
Find out files are provided by the installed package i.e. list where files were installed
</td>
<td>
dpkg -L apache-perl<br /> dpkg -L perl
</td>
|
dpkg -c {.Deb package}
|
<td>
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 installed
</td>
<td>
dpkg -c dc_1.06-19_i386.deb
</td>
|
dpkg -S {/path/to/file}
|
<td>
Find what package owns the file i.e. find out what package does file belong
</td>
<td>
dpkg -S /bin/netstat<br /> dpkg -S /sbin/ippool
</td>
|
dpkg -p {package}
|
<td>
Display details about package package group, version, maintainer, Architecture, display depends packages, description etc
</td>
<td>
dpkg -p lsof
</td>
|
dpkg -s {package} | grep Status
|
<td>
Find out if Debian package is installed or not (status)
</td>
<td>
dpkg -s lsof | grep Status
</td>