feat(clean): add opt-in Docker unused data pruning#554
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds opt-in Docker cleanup to
mo clean.--dockerflag for explicit Docker pruning.mo cleanbehavior safe by skipping Docker unused data unless the flag is set.Related: local storage audit follow-up
Scope
mo clean.Why This Approach
--dockerflag keeps the default cleanup flow conservative while still making the reclaim path easy to discover and script.docker system prune -af --volumesbecause it matches the reclaimable buckets users see indocker system dfbetter thandocker builder prunealone.Validation
bash -n bin/clean.sh lib/core/help.sh lib/clean/dev.sh mole tests/clean_dev_caches.batsbats tests/clean_dev_caches.batsdocker system dfdocker system prune -a --volumes -fNotes
mo cleannow prints a clear skip message for Docker unused data and points users to--docker.15Gto1.2Gafter prune, and free disk increased from53Gito67Gi.