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
| 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 Interface e
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

  1. u: Unknown (an unknown state)
  2. i: Install (marked for installation)
  3. r: Remove (marked for removal)
  4. p: Purge (marked for purging)
  5. h: Hold

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

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

Let’s move to the third character
Third Character: This corresponds to the error state. The possible value include

  1. R: Reinst-required The package must be installed.

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


One thought on “How to interpret the status of dpkg (–list)?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s