1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh die() { echo "$*" >&2 exit 1 } apt-get purge $(dpkg --get-selections | grep awlsim | cut -f1) ||\ die "Failed to purge" exit 0