Content Skeleton

This Page

Previous topic


Next topic

apt-get Unmet Dependencies


The dpkg command and the database of .deb files that is manages are the underpinning for package installation frontend commands such as

  • apt-get OR dselect (choose one apt-get
  • capt

Extracts from below sources that are useful for dependency debugging.

frontends : apt-get OR dselect

package state

From man dpkg.

dpkg maintains some usable information about available packages. The information is divided in three classes: states, selection states and flags. These values are intended to be changed mainly with dselect.


The package is not installed on your system.
Only the configuration files of the package exist on the system.
The installation of the package has been started, but not completed for some reason.
The package is unpacked, but not configured.
The package is unpacked and configuration has been started, but not yet completed for some reason.
The package awaits trigger processing by another package.
The package has been triggered.
The package is unpacked and configured OK.

selection states


dpkg -s, –status package-name

Report status of specified package. This just displays the entry in the installed package status database. To just see package metadata, without local installation infomation, use apt-cache show.


The version number of a package. The format is: [epoch:]upstream_version[-debian_revision]

aracity@aracity-desktop:~$ dpkg -s libc6 | grep ^Version
Version: 2.12.1-0ubuntu10.2
aracity@aracity-desktop:~$ dpkg -s libc6-dev | grep ^Version
Version: 2.9-4ubuntu6.3


If a package is not installed or not configured, this field in dpkg’s status file records the last version of the package which was successfully configured.

  • so presence of this field indicates problems
aracity@aracity-desktop:~$ dpkg -s libc6 | grep Config-Version
Config-Version: 2.9-4ubuntu6.3
aracity@aracity-desktop:~$ dpkg -s libc6-dev | grep Config-Version

Status field enumerations

aracity@aracity-desktop:~$ dpkg --status libc6-dev | grep Status:
Status: install ok installed
aracity@aracity-desktop:~$ dpkg --status libc6 | grep Status:
Status: install ok unpacked

The exact format for the “Status:” field is: Status: Want Flag Status


  • unknown,
  • install,
  • hold,
  • deinstall,
  • purge.


  • ok,
  • reinstreq,
  • hold,
  • hold-reinstreq.


No files are installed from the package, it has no config files left, it uninstalled cleanly if it ever was installed.
The basic files have been unpacked (and are listed in /var/lib/dpkg/info/[package].list. There are config files present, but the postinst script has NOT been run.
The package was installed and unpacked, but the postinst script failed in some way.
All files for the package are installed, and the configuration was also successful.
An attempt was made to remove the packagem but there was a failure in the prerm script.
The package was “removed”, not “purged”. The config files are left, but nothing else.
Old name for half-configured. Do not use.
Old name for half-installed. Do not use.

dpkg –set-selections

Set package selections using file read from stdin. This file should be in the format ‘<package> <state>’, where state is one of install, hold, deinstall or purge. Blank lines and comment lines beginning with ‘#’ are also permitted.


echo "libc6-dev hold" | dpkg --set-selections

dpkg -C, –audit

Searches for packages that have been installed only partially on your system. dpkg will suggest what to do with them to get them working.

aracity@aracity-desktop:~$ dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:

 libgcc1              GCC support library
 libc6                Embedded GNU C Library: Shared libraries

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 gracie               OpenID server for local PAM accounts