Cleanup all merged branches in git

From time to time, I have been cleaning all merged branches using git branch -d command. I was wondering if I can do this automatically. Guess what. I can do that and it's as easy as:

git branch --merged master | grep -v 'master$' | xargs git branch -d

Adding to my git aliases right away!