# Install bfg with Homebrew, MacPorts, scoop

Remove large files or passwords from Git history like git-filter-branch. Version 1.15.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:bfg
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install bfg
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bfg
```

  Evidence: MacPorts ports tree: java/bfg/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/bfg
```

  Evidence: Scoop official bucket manifest trees: bucket/bfg.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:bfg
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/bfg>
- **Version:** 1.15.0
- **Source summary:** Remove large files or passwords from Git history like git-filter-branch
- **Homepage:** <https://rtyley.github.io/bfg-repo-cleaner/>
- **Repository:** <https://github.com/rtyley/bfg-repo-cleaner>
- **Upstream docs:** <https://rtyley.github.io/bfg-repo-cleaner>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://search.maven.org/remotecontent?filepath=com/madgag/bfg/1.15.0/bfg-1.15.0.jar>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- bfg (cli)
- bfg (alias)

## Dependencies

- openjdk

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.15.0
- Local data: ok
- Upstream repository: https://rtyley.github.io/bfg-repo-cleaner/
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

BFG Repo-Cleaner is a Scala/JVM command-line tool for removing large files, passwords, credentials, and other unwanted blobs from Git history. Its official positioning is as a simpler and much faster alternative to git-filter-branch for cleansing bad data from repositories.

### Project history

The official GitHub repository was created in December 2012. BFG's README and project site center on two core repository-cleaning jobs: stripping large blobs and replacing sensitive text across history.

Release history shows BFG maturing through the 2010s, including Git LFS support in v1.12.5 in 2015, Java 8 and Scala 2.12 support in v1.13.0 in 2018, Scala 2.13 in v1.14.0 in 2021, and v1.15.0 in January 2025.

### Adoption history

BFG became widely known because git-filter-branch was powerful but slow and difficult to use for common cleanup jobs. BFG narrowed the problem to the operations teams most often needed after accidentally committing giant artifacts or secrets, then packaged that workflow as a standalone executable.

The input records Homebrew, MacPorts, and Scoop packaging, matching BFG's cross-platform appeal: it is a Java-based tool that can be used from macOS, Linux, or Windows when a Git repository needs emergency cleanup.

### How it is used

Typical usage is on a mirror clone or bare repository, with commands such as stripping blobs above a size threshold or replacing text listed in a file. After BFG rewrites the repository objects, users still need the normal Git cleanup and force-push workflow expected after history rewriting.

Because it rewrites repository history, BFG is used deliberately: it is most valuable when a repository has already leaked bulky files or secrets and the team needs a repeatable cleanup tool rather than manual filter-branch scripting.

### Why package nerds care

BFG is package-nerd significant because it turned one of Git administration's ugliest chores into a memorable, packaged CLI. Before git-filter-repo became the modern upstream-recommended tool, BFG was the package many developers reached for when Git history got polluted.

Its design is a good example of a focused package beating a built-in general-purpose tool for a painful workflow: fewer knobs, better defaults for common cleanup cases, and performance claims strong enough to become part of the project's identity.

### Timeline

- 2012: Official repository created in December.
- 2015: v1.12.5 added Git LFS support.
- 2018: v1.13.0 moved to Scala 2.12 and Java 8.
- 2021: v1.14.0 updated to Scala 2.13.
- 2025: v1.15.0 released in January.

### Related projects

- Related projects include git-filter-branch, git-filter-repo, git lfs migrate, and secret-scanning tools such as Gitleaks or TruffleHog that may detect the problem before BFG is needed.

### Sources

- <https://api.github.com/repos/rtyley/bfg-repo-cleaner>
- <https://api.github.com/repos/rtyley/bfg-repo-cleaner/releases>
- <https://raw.githubusercontent.com/rtyley/bfg-repo-cleaner/master/README.md>
- <https://rtyley.github.io/bfg-repo-cleaner/>
- source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

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

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** bfg
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- MacPorts - bfg: normalized package name match | MacPorts ports tree: java/bfg/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/bfg: normalized package name match | Scoop official bucket manifest trees: bucket/bfg.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [openjdk](https://www.automicvault.com/pkg/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [gti](https://www.automicvault.com/pkg/brew/gti/) - Shares av.db curated category or tags: cli, developer-tools, git.
- [onefetch](https://www.automicvault.com/pkg/brew/onefetch/) - Shares av.db curated category or tags: cli, developer-tools, git.
- [semtag](https://www.automicvault.com/pkg/brew/semtag/) - Shares av.db curated category or tags: cli, developer-tools, git.
- [serie](https://www.automicvault.com/pkg/brew/serie/) - Shares av.db curated category or tags: cli, developer-tools, git.
- [willgit](https://www.automicvault.com/pkg/brew/willgit/) - Shares av.db curated category or tags: cli, developer-tools, git.
- [git-delete-merged-branches](https://www.automicvault.com/pkg/brew/git-delete-merged-branches/) - Shares av.db curated category or tags: cli, developer-tools, git, repository-cleanup.
- [git-filter-repo](https://www.automicvault.com/pkg/brew/git-filter-repo/) - Shares av.db curated category or tags: cli, developer-tools, git, history-rewrite.
- [pipet](https://www.automicvault.com/pkg/brew/pipet/) - Shares av.db curated category or tags: cli, developer-tools, git.
- [scm-manager](https://www.automicvault.com/pkg/brew/scm-manager/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, git, openjdk.

## Combined YAML source

View the package source record on GitHub. [combined/bfg.yml](https://github.com/automic-vault/db/blob/main/combined/bfg.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
