Software Engineer is(should be) a most efficient Problem Solver.
Powershell command:
,@(git branch | Select-String -Pattern "[^(*?)\s? master]") | ForEach-Object{$_.Line.Trim()} | %{git branch -D $_}