glab repo adds command to prune merged local branches
Introduced 2026-06-05 · score 0.97
HOW TO USE IT
When you need to remove merged local branches, run `glab repo prune`; it checks merge requests and prompts before deleting eligible branches. Use `--dry-run` to preview first.
glab repo prune --dry-runglab repo pruneglab repo prune --yesWHY THIS HELPS
Remove merged local branches while maintaining a repository checkout.
REQUIREMENTS AND LIMITATIONS
- Version: v1.102.0
- --dry-run: Preview branches without deleting them.
- -e, --exclude <branch-or-glob>: Exclude branches by name or glob; comma-separated or repeatable.
- --merged: Use `git branch --merged` instead of querying GitLab; detects fast-forward merges only.
- -y, --yes: Skip the confirmation prompt.
- Prerequisite: Run in a repository checkout. GitLab is queried by default to check merge request status for local branches.
FIRST-PARTY EVIDENCE
Check the installed version and the source before using it. Entry JSON