I’ve been setting up the debian box that hosts http://cavehome.dyndns.org and teaching myself a bit about debian package management. It’s useful stuff to know if’n you need to get your packages in order. I never got comfortable with RedHat’s package-management system without their GUI tools and have found that debian’s apt-get and dpkg are easier to navigate.
Without further ado, here’s a few common uses of apt-get, apt-cache and dpkg -
apt-cache search apache2- search for any package that with “apache2″ in the name or descriptionapt-cache show apache2- show full description of the “apache2″ package including dependenciesdpkg --list- list all installed packages. This is great, and afaik, alleviates the the need for the “apt-show-packages”, at least for what I formerly used it.apt-get install apache2- install “apache2″ package, including all packages that it requires to work.apt-get remove apache2- remove “apache2″ package, but not necessarily other packages that you installed when originally installing “apache2″.dpkg -L apache2- list files in “apache2″ package