git remote update origin --prunegit remote prune origingit branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -dgit branch -vv | where {$_ -match '\[origin/.*: gone\]'} | foreach {git branch -d ($_.split(" ", [StringSplitOptions]'RemoveEmptyEntries')[0])}git remote update origin --prune; git branch -vv | where {$_ -match '\[origin/.*: gone\]'} | foreach {git branch -D ($_.split(" ", [StringSplitOptions]'RemoveEmptyEntries')[0])}