# Install git-delete-merged-branches with Homebrew, apt, Nix

Command-line tool to delete merged Git branches. Version 7.6.1 via Homebrew; verified 2026-07-23. Also installable with debian: sudo apt install git-delete-merged-branches.

## Install

```sh
sudo av install brew:git-delete-merged-branches
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install git-delete-merged-branches
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install git-delete-merged-branches
```

  Evidence: Debian stable package indexes: git-delete-merged-branches from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#git-delete-merged-branches
```

  Evidence: nixpkgs package indexes: pkgs/by-name/gi/git-delete-merged-branches/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:git-delete-merged-branches
- **Package manager:** Homebrew
- **Version:** 7.6.1
- **Source summary:** Command-line tool to delete merged Git branches
- **Homepage:** <https://github.com/hartwork/git-delete-merged-branches>
- **Last updated:** 2026-07-23T20:48:43Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- git-dmb (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 7.6.1
## Project history and usage

git-delete-merged-branches is a Python command-line tool for cleaning up local and remote Git branches after their work has been merged. Its package installs the shorter `git-dmb` executable and documents safety-focused branch deletion.

### Project history

The upstream Git history begins in July 2020 with code for version 1.0.0. The project advanced quickly through early releases and later settled into a maintained CLI with tests, pre-commit integration, and package-manager distribution.

The README frames the tool around safe cleanup rather than raw deletion. It detects multiple forms of de-facto merges, including rebase merges, squash merges with extra effort, and cherry-picks by leveraging `git cherry`; it also supports workflows with multiple release branches.

### Adoption history

The official README lists install paths through pip and distribution packages including Arch AUR, Debian, Gentoo, Homebrew, MacPorts, NixOS, Ubuntu, and Void Linux. That makes the tool visible in the same package-manager space as Git workflow helpers rather than only as a Python package.

Its README also documents a command-name clash with git-extras, whose utility collection ships a simpler `git-delete-merged-branches` script. The standalone project responds by offering `python3 -m git_delete_merged_branches` and `git-dmb` invocation paths.

### How it is used

Practitioners run it inside a repository to update remotes, fast-forward tracked release branches, list local and remote branches that appear merged, and ask before deletion. A `--dry-run` mode lets users inspect actions first, and `--verbose` shows Git commands.

The tool is used when teams accumulate topic branches across local clones, forks, and remote hosts. It is provider-agnostic and documents use with GitHub, GitLab, Gitea, and other Git hosting because it works through Git commands rather than a hosting API.

### Why package nerds care

The package is a good example of a small workflow CLI whose value lies in guardrails: branch deletion is risky, so the project packages conservative prompts, dry runs, `--force-with-lease`, and no shell-command construction.

Its overlap with git-extras is package-manager-relevant because PATH order can decide which command a user runs when both packages are installed.

### Timeline

- 2020: The repository begins with version 1.0.0 code.
- 2020: Rapid 1.x through 6.x releases establish the CLI and packaging shape.
- 2021: Version 6.4.0 continues the maintained Python CLI line.
- 2022: Version 7.4.0 lands after several 7.x releases.
- 2025: Version 7.5.0 is released.
- 2026: Version 7.6.0 is released.

### Related projects

- git-extras is a related utility collection and a direct command-name conflict noted by the README.
- GitHub's automatic deletion of branches for merged pull requests is mentioned as a complementary hosting-side cleanup feature.
- `git cherry` is the Git command named by the README as part of merge-detection logic.

### Sources

- <https://formulae.brew.sh/formula/git-delete-merged-branches documents Homebrew packaging.>
- <https://github.com/hartwork/git-delete-merged-branches documents installation, examples, features, safety rules, best practices, and the git-extras command-name clash.>
- <https://github.com/hartwork/git-delete-merged-branches/releases documents release progression.>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Other Package-Manager Records

- Debian apt - git-delete-merged-branches - 7.5.0-1: normalized package name match | Debian stable package indexes: git-delete-merged-branches from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line tool to delete merged git branches | https://github.com/hartwork/git-delete-merged-branches
- Debian apt - python3-git-delete-merged-branches - 7.5.0-1: normalized package name match | Debian stable package indexes: python3-git-delete-merged-branches from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line tool to delete merged git branches (Python module) | https://github.com/hartwork/git-delete-merged-branches
- Nix - git-delete-merged-branches: normalized package name match | nixpkgs package indexes: pkgs/by-name/gi/git-delete-merged-branches/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - git-delete-merged-branches - 7.4.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: git-delete-merged-branches from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line tool to delete merged git branches | https://github.com/hartwork/git-delete-merged-branches
- Ubuntu apt - python3-git-delete-merged-branches - 7.4.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-git-delete-merged-branches from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line tool to delete merged git branches (Python module) | https://github.com/hartwork/git-delete-merged-branches


## Combined YAML source

View the package source record on GitHub. [combined/git-delete-merged-branches.yml](https://github.com/mxcl/pkgdb/blob/main/combined/git-delete-merged-branches.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
