list of installed packages without using apt?

Stuart McGraw smcg4191 at mtneva.com
Mon Nov 27 22:18:02 UTC 2017


Is there some way of getting output similar to 'apt list --installed' 
without using apt?  Specifically I want a list of installed packages,
their version numbers, and whether they were installed at my request
or as a dependency.  dpkg-query provides the first two items and I 
think apt-mark the last, but the problem is combining them.

I dont want to use apt because: 1) I am using in a shell script and 
apt prints an annoying warning, 2) The warning recommends against 
using apt in scripts :-)  I want to use basic low-level commands
and not large complex things like apt or aptitude. 





More information about the ubuntu-users mailing list