90-cleanup-pkgs 331 Bytes
Newer Older
1 2 3
#!/bin/sh -efu
# remove temporary packages from the installed system

4 5 6 7
if [ -n "$GLOBAL_VERBOSE" ]; then
	echo "** GLOBAL_CLEANUP_PACKAGES: $GLOBAL_CLEANUP_PACKAGES"
fi >&2

8 9
[ -n "$GLOBAL_CLEANUP_PACKAGES" ] || exit 0

10 11
list="$(rpmquery -a --qf='%{NAME}\n' $GLOBAL_CLEANUP_PACKAGES)"
[ -z "$list" ] || apt-get remove -f -y  -- $list