# 使用 Homebrew, MacPorts, scoop 安装 bfg

查看 bfg 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install bfg
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bfg
```

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:bfg
- **软件包管理器:** Homebrew
- **版本:** 1.15.0
- **来源摘要:** Remove large files or passwords from Git history like git-filter-branch
- **主页:** <https://rtyley.github.io/bfg-repo-cleaner/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- bfg (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.15.0
## 项目历史与用法

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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

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.

### 时间线

- 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.

### 来源

- <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


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- 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


## Combined YAML source

View the package source record on GitHub. [combined/bfg.yml](https://github.com/mxcl/pkgdb/blob/main/combined/bfg.yml)


## 来源

- 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
