#!/bin/sh # a1-dpkg-list - give an overview of debian packages installed on the system # This script is in the public domain # ssh root@$h "dpkg-query -W -f='\${Version}\n' bash" # see dpkg-query(1) for list of supported fields # nice to have, but not very commonly available: # Installed-Size # MD5sum # Origin # The last three columns of the output show the desired action, the package # status, and errors, in that order. # # Desired action "Want": u = Unknown i = Install h = Hold r = Remove p = Purge # Package status "Status": n = Not-installed c = Config-files H = Half-installed # U = Unpacked F = Half-configured W = Triggers-awaiting # t = Triggers-pending i = Installed # Error flags "Eflag": = (none) R = Reinst-required dpkg-query -W -f='${Package} ${Version} ${db:Status-Want} ${db:Status-Status} ${db:Status-Eflag}\n'