#!/bin/bash for i in kdebase kdesdk do if ( pkginfo -l $i > /dev/null 2>&1 ) ; then pkgrm $i fi done