git remote prune origin code example
Example 1: git remove deleted remote branches
git fetch origin --prune
Example 2: git prune remote branches
git remote prune origin
Example 3: git prune local branches
npx git-removed-branches --prune
git fetch origin --prune
git remote prune origin
npx git-removed-branches --prune