fixed package purge
do the pkg check the other way round