dpkg Package Status Meaning

Last modified by Justin Morgan on 2019/09/29 18:04

How to interpret the status of dpkg (–list)?


dpkg (debian package manager) is the package manager for Ubuntu (debian based distributions). dpkg can be used to install packages in Ubuntu. With dpkg, you can see the status of various packages like:

  • the packages are currently installed
  • the packages are removed
  • the configuration files are present
  • marked for removal
Let’s explore the output of dpkg --list.

$ dpkg --list
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description +++-============================================================================================
ii acpi-support 0.136 scripts for handling many ACPI events
ii acpid 1.0.10-5ubuntu2 Advanced Configuration and Power Interfacee
...
rc dvipdfmx 1:20090115-1.2 A DVI to PDF translator with CJK support
ii e2fslibs 1.41.11-1ubuntu2 ext2/ext3/ext4 file system libraries

The first column corresponds to the status of a package. How to interpret this status.

Status of every package is represented by three characters xxx

Let’s explore each of the character signify.

First character: The possible value for the first character. The first character signifies the desired state, like we (or some user) is marking the package for installation

  • u: Unknown (an unknown state)
  • i: Install (marked for installation)
  • r: Remove (marked for removal)
  • p: Purge (marked for purging)
  • h: Hold

Second Character: The second character signifies the current state, whether it is installed or not. The possible values are

  • n: Not- The package is not installed
  • i: Inst – The package is successfully installed
  • c: Cfg-files – Configuration files are present
  • u: Unpacked- The package is stilled unpacked
  • f: Failed-cfg- Failed to remove configuration files
  • h: Half-inst- The package is only partially installed
  • W: trig-aWait
  • t: Trig-pend

Let’s move to the third character

Third Character: This corresponds to the error state. The possible value include

R: Reinst-required The package must be installed.

Now you can easily interpret what ii, pn and rc correspond to.