Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: prune lfs files #540

Open
memeplex opened this issue Feb 14, 2024 · 0 comments
Open

Question: prune lfs files #540

memeplex opened this issue Feb 14, 2024 · 0 comments

Comments

@memeplex
Copy link

Sorry for asking here but I didn't found a better place.

I would like to prune old versions from local lfs storage, in a similar way as git lfs prune does. The problem with git lfs prune is that it's intended to free local space but doesn't actually change history, so the reference to the old version remains. If I then want to clone or push the repo I get errors like

Your push referenced at least 1 unknown Git LFS object

So I would like to remove those old versions altogether. I could be something like "keep just the newest k versions" or "remove all versions older than t" or "remove all versions that are larger than s". In all cases, the last version should be kept and when a version is deleted both the file and the reference should be removed.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant