Following command edits the bare repo (rather than a clone of the repo)
cd bare_git_repo
git filter-branch --prune-empty -d /Users/username/software/git_test/git_backup --index-filter "git rm --cached -f --ignore-unmatch a_large_binary" --tag-name-filter cat -- --all
Then run the following on the bare repo
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git gc --prune=now
Now that the bare repo is cleaned, users should discard old clone and get a new clone
cd cloned_git_repo
rm -rf bare_git_repo/
git clone file:///Users/username/software/git_test/bare_git_repo/
cd bare_git_repo/
Verify in the cloned version the file is actually gone:
git log --graph --decorate --pretty=oneline --abbrev-commit --all --name-status
The above comes from https://stackoverflow.com/a/2158271/1164295. That answer has a clear explanation, except for the parts that are supposed to be run against the bare repo (versus a cloned repo)
The best option, if the software is available, would be https://rtyley.github.io/bfg-repo-cleaner/
For other instruction resources for the manual approach, see