$ pip install git-filter-repo # official recommendation $ git filter-repo --filename-callback 'return filename if b"filename.zip" not in filename else None' \ --prune-empty=always --force