Git Delete all local branches except main November 24, 2022 by Samuel Haddad·0 Comments git branch | grep -v "main" | xargs git branch -D Share this:FacebookX