This unsafe and destructive command deletes all the prigin branches except the ones mentioned as grep -v 'uat'
git branch --remote | grep -v 'dev' | grep -v 'qa' | grep -v 'uat' | grep -v 'master' | cut -b 10- | xargs
git branch --remote | grep -v 'dev' | grep -v 'qa' | grep -v 'uat' | grep -v 'master' | cut -b 10- | xargs git push --delete origin