delete all local branches git

Shell
$ git branch | grep -v "master" | xargs git branch -D $ git branch | grep -v '^*' | xargs git branch -Dgit branch | grep -v "master" | xargs git branch -D
Source

Also in Shell: