to remove a specific version

remove all references to it (delete the branch, etc)

git reflog expire --expire=now --all

git gc --prune=now



more: [1]

to modify existing versions to remove specific files

[1] [2] [3]