git branch --merged | egrep -v "(master|development)" | xargs -n 1 git branch -d
git branch --merged | egrep -v "(master|development)" | xargs -n 1 echo
git branch -r --merged | egrep -v "(master|development)"| grep origin | sed 's/origin\///' | xargs -n 1 git push --delete origin
git branch -r --merged | egrep -v "(master|development)"| grep origin | sed 's/origin\///' | xargs -n 1 echo
Once you delete the branch from the remote, you can prune to get rid of remote tracking branches with:
git remote prune origin