This task can be performed using Gat
Git Automation Tool
Best product for this task
Gat
dev-tools
A few months ago I needed to clear every feature branch that were in my local repo. After delete manually more than 10 branches, it was so annoying that I didn't want to repeat it. So I thought, I've never build a full Rust app before but I'll use it to help me with git. So created gat, a terminal tool that with one command, it executes whatever is needed so I don't need to do boring git operations and can focus on cool rebase interactive operations. I hope it can help you as much as it helps me.

What to expect from an ideal product
- Deletes multiple local git branches with a single command instead of removing them one by one manually
- Automatically identifies and cleans up feature branches that are no longer needed in your local repository
- Saves time by eliminating repetitive git branch deletion tasks that can take forever when done by hand
- Runs all necessary git operations behind the scenes so you don't have to remember complex command sequences
- Lets you focus on actual development work instead of spending time on tedious branch maintenance
