Add this function to bashrc:
function gitcleanlocalbranches() { git remote prune origin git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D }