dpkg -l will list information about all installed packages on your system. In combination with grep, you can filter out what you want.

e.g.
dpkg -l | grep ftp 

The first column of the output is usually two letters, representing the desired state and the current state respectively.

Desired state identifier:

  • Unknown (u)
  • Installed (i)
  • Deleted (r)
  • Clear (p)
  • Hold (h)

Current status identifier:

  • Not installed(n)
  • Installed (i)
  • Configuration only (c)
  • Uncompressed only (U)
  • Failed to configure (F)
  • Incomplete installation (H)
  • Trigger waiting (W)
  • Trigger pending (T)

The most common one in our systems in general is ii (expects to install and has installed properly). Another more common one is rc (expected to uninstall and currently only retains some configuration information).

The contents of all installed packages on the system are recorded in: /var/lib/dpkg/status, the dpkg -l command is what reads the contents of this file for display.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *