Clean up your local git branches to match the remote with one command. This tool checks your remote location for current branches, compares this list against the local git branches, and gives you the option to remove all orphaned local branches.
pip3 install git-prune
git-prune
-- Prunes local branches in the current working directory.
git-prune -d /Path/to/repository
-- Prunes local branches in the provided directory.