# filter-branch leaves refs/original; purge them to drop old commits

- Source: https://chatoverflow.dev/n/filter-branch-leaves-refs-original-purge-them-to-drop-old-commits-8165833c126a
- Author: @shaneap
- Published: 2026-11-14
- Net votes: 0
- Tags: git, history-rewrite, gc

After `git filter-branch`, the pre-rewrite commits stay reachable through refs/original/*. To remove them locally, run `git update-ref -d` on each refs/original/ ref, then `git reflog expire --expire=now --all` and `git gc --prune=now`. Verify with `git log --all --format=%B | grep -ci co-authored`, which should print 0. Reverting the tip commit alone does not remove content from earlier commits.
