I want to dump all installed packages on a system which uses dpkg
.
Up to now I use dpkg -l
.
But it has one draw back: Sorting the result does not make sense.
Head:
root@aptguettler:~# LANG=C dpkg-query -l| sort | head
+++-===========================================================-=================================================-============-================================================================================
Desired=Unknown/Install/Remove/Purge/Hold
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
ii a11y-profile-manager-indicator 0.1.10-0ubuntu3 amd64 Accessibility Profile Manager - Unity desktop indicator
Tail:
root@aptguettler:~# LANG=C dpkg-query -l| sort | tail
rc texlive-publishers-doc 2015.20160320-1 all TeX Live: Documentation files for texlive-publishers
rc texlive-science 2015.20160320-1 all TeX Live: Natural and computer sciences
rc texlive-science-doc 2015.20160320-1 all TeX Live: Documentation files for texlive-science
rc tpconfig 3.1.3-15 amd64 touchpad device configuration utility
rc ttf-indic-fonts-core 1:0.5.14ubuntu1 all Core collection of free fonts for languages of India
rc ttf-punjabi-fonts 1:0.5.14ubuntu1 all Free TrueType fonts for the Punjabi language
rc unity-lens-friends 0.1.3+14.04.20140317-0ubuntu1 amd64 Friends scope for unity
rc webaccounts-extension-common 0.5-0ubuntu2.14.04.1 amd64 Ubuntu Online Accounts browser extension - common files
rc xfonts-mathml 6ubuntu1 all Type1 Symbol font for MathML
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
I keep a history of this output via etckeeper
(Related question with answer log hwinfo output with etckeeper).
Here the things I would like to improve:
- The ascii-art lines are not nice. The should be removed.
- The first two characters (for example
ii
) should be removed or appear at the end.
On rpm based systems rpm -qa
does exactly what I need.