BFG Repo-Cleaner is a command-line tool for cleaning unwanted data from Git repository history.
It’s designed for common but painful maintenance jobs such as removing huge blobs, purging leaked credentials, and stripping private files from previous commits. The tool offers a focused alternative to git-filter-branch, with a simpler workflow and strong performance from processing Git objects efficiently and using multi-core JVM execution.
This is free and open source software.
Key Features
- Removes large files and troublesome blobs from Git repository history.
- Deletes files or folders matching specified names or patterns.
- Replaces sensitive text such as passwords and credentials from historical commits.
- Protects the current HEAD commit by default to reduce the risk of breaking the latest project state.
- Updates commits, branches, and tags in mirror clones before standard Git garbage collection removes unwanted objects.
- Runs as a self-contained Java application, with Scala libraries and dependencies folded into the downloadable JAR file.
- Requires Java 11 or above.
Website: github.com/rtyley/bfg-repo-cleaner
Support:
Developer: Roberto Tyley
License: GNU General Public License v3.0

BFG Repo-Cleaner is written in Scala. Learn Scala with our recommended free books and free tutorials.
Related Software
| Git Tools for Diff Review and Repository History | |
|---|---|
| difftastic | Structural diff tool that compares files based on their syntax |
| git-filter-repo | Quickly rewrite git repository history |
| onefetch | Displays information about a local Git repository |
| git-stats | Local git statistics including GitHub-like contributions calendars |
| diff-so-fancy | Attractive diffs with diff-highlight and more |
| BFG Repo-Cleaner | Clean unwanted data from Git repository history |
| git-delta | Viewer for git and diff output |
| gitlogue | Cinematic Git commit replay tool |
| git-quick-stats | Access various statistics in a git repository |
| git-who | Command-line Git analysis tool |
| git-standup | Recall what you did on the last working day |
| git-of-theseus | Analyze how a Git repo grows over time |
| git-sizer | Compute various size metrics for a git repository |
| diffnav | Git diff pager based on delta but with a file tree, à la GitHub |
| critique | Terminal UI for reviewing git diffs |
| git-big-picture | Visualization tool for Git repositories |
| hercules | Gain advanced insights from Git repository history |
| keifu | TUI that visualizes Git commit graphs |
| git-fame | Git repository collaborators sorted by contributions |
| needle | Highlights GitHub PRs |
| mergiraf | Git merge driver |
| git-history | Analyze Git history using SQLite |
| ec | Terminal Git mergetool |
| diffr | Word-by-word diff highlighting utility |
| git-scope | Fast TUI dashboard to view the git status of all your repositories |
| mamediff | Manages unstaged and staged Git diffs |
| deadbranch | Keep Git repositories tidy |
| GitTop | Lightweight desktop client for GitHub notifications |
| git-heatmap | Generates a customizable heatmap |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

