Background

Originally created for Debian, this package manager is the standard for all debian based linux distributions. It is used to distribute packages in binary or source forms. This package management system consists of a few different programs with specific purposes. dpkg installs and removes local packages, checkinstall builds binary packages from source, apt-get retrieves packages from a central server resolving depedencies as it goes, and apt-cache allows for easy searching and listing of packages.

Advantages

Advantages of the dpkg system

  • Binary Compatibility: binary packages are usually compatible across distributions, such as from debian to ubuntu or vice-versa.
  • Source install creates package: this allows for easy installs, upgrades and removal.
  • Central servers: Packages are located on central servers read in from a list the user can change, add, and remove from.
  • Safe upgrading: Dpkg allows for safe system-wide distribution upgrades.
  • Resolves dependencies: This occurs automatically and will not allow a package with broken dependencies to be installed.
  • Holdback ability: you can mark packages to be held back (not upgraded) or even downgrade packages if you wish.

Disadvantages

Disadvantages of the dpkg system

  • Old/broken packages: Depending on the repository you are using, some packages can be broken or out of date.

Usage

Update list of available software, and upgrade system:
apt-get update
apt-get upgrade
Install and remove a package from a repository:
apt-get install <package_name>
apt-get remove <package_name>
Install and remove a local package:
dpkg -i <package_name.deb>
dpkg -r <package_name>
Create your own package from source:
./configure
make
checkinstall
Install a source package:
apt-get source <package_name>
apt-get build-dep <package_name>
Search for packages:
apt-cache search <search_keyword>

Frontends

Popular graphical frontends for dpkg include:
Adept Manager (for KDE):
Adept Manager Screenshot
Synaptic (for GTK):
Synaptic Screenshot