Found myself typing this in a shell:
gem list --local |\
egrep '.*(.*,.*)' |\
sed 's/^\([^ ]*\) ([^,]*,\(.*\))/\1\2/' |\
sed 's/,//g' |\
awk '{for (i = 2; i <=NF ;i++) {printf "sudo gem uninstall %s --version=%s\n", $1, $i}}'
Sometimes perl or ruby with -e is just faster