For example, if I run the following command dpkg -l ‘*compiz*’
the output is as follows:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
pi compiz 1:0.9.12.2+1 all OpenGL window and compositing man
ii compiz-core 1:0.9.12.2+1 amd64 OpenGL window and compositing man
un compiz-core-ab <none> <none> (no description available)
[more output deleted]
The output is a little cryptic. There are several detailed explanations on askubuntu, of which, example, is one. Likewise, man dpkg
and man dpkg-query
give similar explanations.
The first character in the first field, ‘p’, in our example output above, indicates the desired status of the package. Which is the status that the packaging system thinks the package should be in.
What is the underlying meaning of the desired status? I.e. Why does the packaging managing system have an idea of what status a package should be in? I could see that an intelligent system would recommend (or desire) a package to be purged if it was only ever used as a dependency to an already removed parent package. However, this is not the case in our example.
In our example, the package ‘compiz’ is installed, however dpkg
believes it should be purged, or at least that it is desirable that the package is purged, why is this? Moreover, how does this particular field work in general? I.e. how does the system decide on a ‘desired status’ for a package and what are the underlying reasons for this functionality?