Install Debian Packages Linux

Install Debian Packages Linux using aptitude, dpkg, apt-get

Install Debian Packages Linux

Install Debian Packages Linux

There are multiple package managers to Install, Remove, Configure and manage Packages in Debian Linux. It is important to understand that the higher level package manager tools such as aptitude rely on apt which, itself, relies on dpkg to install Debian packages in the system.

Install, Remove, and Configure Debian Packages using aptitude

aptitude is a package manager for Debian GNU/Linux systems that provides a frontend to the apt package management infrastructure. aptitude is a text-based interface using the curses library, it can be used to perform management tasks in a fast and easy way.

aptitude provides the functionality of dselect and apt-get, as well as many additional features not found in either program:

  • aptitude offers easy access to all versions of a package.
  • aptitude makes it easy to keep track of obsolete software by listing it under “Obsolete and Locally Created Packages”.
  • aptitude includes a fairly powerful system for searching particular packages and limiting the package display. Users familiar with mutt will pick up quickly, as mutt was the inspiration for the expression syntax.
  • aptitude can be used to install the predefined tasks available.
  • aptitude in full screen mode has su functionality embedded and can be run by a normal user. It will call su (and ask for the root password, if any) when you really need administrative privileges.

Install, Remove, and Configure Debian Packages using dpkg

dpkg package manager in Debian is the main package management program. dpkg can be invoked with many options.

  • dpkg {-i|–install} <package-name> will install the specified package

  • dpkg {-r|–remove} <package-name> will remove the specified package (but leave the configuration files intact)

  • dpkg {-P|–purge} <package-name> will remove the specified package and the corresponding configuration files

  • dpkg –root /target -i <package> will install a package into a unbootable system by specifying the system root.

  • dpkg –unpack <package-name> will unpack (but do not configure) a Debian archive into the file system of the hard disk

  • dpkg –configure <package-name> will configure a package that already has been unpacked

Querying Package Information

  • dpkg –info <package-name> will print out the control file (and other information) for a specified package

  • dpkg {-l|–list} this will give you a list of installed packages.

  • dpkg {-a|–pending} is given instead of a package name, then all packages unpacked, but marked to be removed or purged in file /var/lib/dpkg/status, are removed or purged, respectively.

  • dpkg -s (–status) <package-name> will give you a description of installed package

Updating Package Information

  • dpkg –update-avail <package-name> will replace old information with with new information from package.

  • dpkg –merge-avail <package-name> will combine old information with new information from package.


dpkg-reconfigure reconfigures packages after they have already been installed.

  • dpkg-reconfigure <package-name> to reconfigure the initial installation settings

  • dpkg-reconfigure –priority=medium package […] will set the minimum priority of question that will be displayed

  • dpkg-reconfigure –all will reconfigure all packages

  • dpkg-reconfigure locales will generate any extra locales

  • dpkg-reconfigure –p=low xserver-xfree86 will reconfigure X server

Install, Remove, and Configure Debian Packages using apt-get

APT is the Advanced Package Tool and provides the apt-get program. apt-get provides a simple way to retrieve and install packages from multiple sources using the command line. Unlike dpkgapt-get does not understand .deb files, it works with the packages proper name and can only install .deb archives from a source specified in /etc/apt/sources.listapt-get will call dpkg directly after downloading the .deb archives from the configured sources.

  • apt-get install <package-name> will search its database for the most recent version of this package and will retrieve and install it from the corresponding archive as specified in sources.list. In the event that this package depends on another APT will check the dependencies and install the needed packages.

    • apt-get install <package-name>=<version> will install a package at the version specified

    • apt-get install <package-name> -o DPkg::options::=”–force-overwrite” installs a package ignoring “error processing …, which is also in package …” errors.

  • apt-get remove <package-name> will remove the specified package but keep its configuration files.

  • apt-get –purge remove <package-name> will remove the specified package and its configuration files.

  • apt-get -u install <package-name> will upgrade and install a specific package.

  • apt-get -u upgrade will upgrade packages within the same distribution packages except those which have been kept back because of broken dependencies or new dependencies.

  • apt-get -u dist-upgrade will upgrade an entire Debian system at once.

More reference on The Debian package management tools

Proudly powered by WordPress   Premium Style Theme by
%d bloggers like this: