summaryrefslogtreecommitdiff
path: root/list-installed.d/50list-installed
diff options
context:
space:
mode:
Diffstat (limited to 'list-installed.d/50list-installed')
-rwxr-xr-xlist-installed.d/50list-installed8
1 files changed, 8 insertions, 0 deletions
diff --git a/list-installed.d/50list-installed b/list-installed.d/50list-installed
new file mode 100755
index 0000000..116a42a
--- /dev/null
+++ b/list-installed.d/50list-installed
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Output to stdout a *sorted* list of all currently installed
+# (or removed but still with config-files) packages, in the
+# format "package version\n".
+if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then
+ dpkg-query -W -f '${Status}\t${Package} ${Version}\n' | \
+ egrep '(ok installed|ok config-files)' | cut -f2,3
+fi