To delete every branch except the one that you currently have checked out:
for b in `git branch --merged | grep -v \*`; do git branch -D $b; done
I would recommend changing git branch -D $b
to an echo $b
the first few times to make sure that it deletes the branches that you intend.