Sometimes you just want to clean up your local branches after you've pushed everything to orign.
The following command deletes all local branches:
git branch | grep -v main | xargs git branch -d
The single commands in detail:
git branch
lists all local branchesgrep -v main
filters it by all branches except mainxargs git branch -d
executes the deletion