Delete all groups

is their way to delete all the groups instead of one by one? My site got hit by some spammers and have a few pages of groups