docs/lfs-purge.md
Forward-only deletes of model/TTS binaries shrink future clones but do not reduce GitHub LFS storage charges. GitHub bills for every unique LFS object still reachable from the remote until those objects are purged.
Do this only after the fetch-based workflow
(scripts/fetch-voice-assets.sh) is on the
default branch and the team agrees to a force-push + re-clone.
main (or your default branch).scripts/fetch-voice-assets.sh all.git clone --mirror).From a fresh mirror clone:
git clone --mirror [email protected]:moonshine-ai/moonshine.git moonshine-lfs-purge.git
cd moonshine-lfs-purge.git
# Export listed paths out of LFS / remove their blobs from history.
# Adjust the path list to match what was deleted from HEAD.
git lfs migrate export --everything \
--include="core/moonshine-tts/data/**,\
examples/**/tts-data/**,\
test-assets/**/*.ort,\
test-assets/tiny-en/tokenizer.bin,\
test-assets/tiny-streaming-en/**,\
python/src/moonshine_voice/assets/tiny-en/*.ort,\
android/java/androidTest/assets/tiny-en/*"
Alternatively use git filter-repo
with --path / --path-glob removals for the same trees, then
git lfs prune.
Force-push all refs (coordinate with the org):
git push --force --all
git push --force --tags
Every clone and fork must re-clone; old remotes will disagree on history.
Rewriting history orphans LFS objects but does not free billed storage until
GitHub deletes them. Open a ticket with GitHub Support asking to purge orphaned
LFS objects for moonshine-ai/moonshine after the force-push.
Include:
git lfs ls-files | wc -l # should be ~ORT libs + embedded .cpp only
du -sh .git/lfs # local cache; prune with: git lfs prune
Check the org’s GitHub LFS storage graph after Support confirms the purge.