Univention Bugzilla – Attachment #7590: proposed patch for bug #41037
do
PKGRM=`echo $I | tr -d "="`
if dpkg-query -W -f='${Status}' $PKGRM | grep -q "installed"; then
if dpkg-query -W -f='${Status}' $PKGRM | grep -q "[^-]installed"; then
rmneeded="$rmneeded $I"
fi
done