git fetch --prune git branch -vv | grep 'gone]' | awk '{print $1}' | while read b; do git branch -D "$b" done