-
Search for existing packages:
apt-cache search openjdk
-
Install:
apt-get install openjdk-7-jdk
ordpkg -i <file.deb>
-
List installed packages:
dpkg -l | grep <package-name>
ordpkg --get-selections | grep <package-name>
-
Remove(uninstall):
apt-get purge openjdk-7-jdk
orapt-get remove openjdk-7-jdk
or use purge instead, seeapt-get help
. Or usedpkg
:dpkg -r <package_name> dpkg -P <package_name>
-
Hold a package(not upgrade anymore):
aptitude hold <package-name>
Release the holding of a package:aptitude unhold <package-name>
Usefor package name auto-completion.