Remove local branch

git branch -D BRANCH_NAME

Remove remote branch

git push origin :BRANCH_NAME

Delete all local branch except master

git branch | grep -v 'master' | xargs git branch -D