File: 50list-installed

package info (click to toggle)
etckeeper 0.48
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 380 kB
  • ctags: 32
  • sloc: sh: 916; makefile: 44; python: 41
file content (10 lines) | stat: -rwxr-xr-x 459 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#!/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" (or something similar).
if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then
	dpkg-query -W -f '${Status}\t${Package} ${Version}\n' | \
		egrep '(ok installed|ok config-files)' | cut -f2,3
elif [ "$LOWLEVEL_PACKAGE_MANAGER" = rpm ]; then
	rpm -qa --queryformat "%{name} %{version} %{arch}\n" | sort
fi