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?
I don't know if you ever used tools like
aptitude
orsynaptic
, even lower levels commands like:dpkg
,dpkg-purge
etc.Using tools like
aptitude
, I can mark a lot of packages for removal, some to purge and some others for install, downgrade, etc, then I can run a single command to do all necessary stuff to get what I want (trigger pending actions).The desired field is used to determine what should I do with a package.
Lets install
axel
:Now lets see its status:
I can mark it for
purge
:Now the desired action is:
I could mark the package for "purge" using other tools too:
Now if I run:
or
it asks me that if I want to remove
axel
or not...Where this data come from: