This will remove all deleted remote branches and remove local branches that are tracking a deleted remote branch. This is borrowed from here.
$ git config --global alias.gone "! git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '\$2 == \"[gone]\" {print \$1}' | xargs -r git branch -D"
$ git gone