#!/bin/bash
if [ $(id -u) != 0 ]; then
 echo Error: You must be root to run this script!
 exit 1
fi
if [ -x /usr/bin/dpkg-awk ]; then
 apt-get -y remove --purge $(dpkg-awk 'Section:games' 'Status:ok installed'|awk '/Package/{print $2}')
else
 echo Error: dpkg-awk is missing! Please install it!
 exit 2
fi
