remove all local branches not on remote code example
Example: Remove All Local Branches not on Remote
$ git branch -r | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | xargs git branch -d
$ git branch -r | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | xargs git branch -d