pub const CACHES_CLEAR_LONG: &str = "\
Empty one manager's cache, or every one of them. What is about to go is listed and \
sized first, and unless `--yes` answers for you, it asks.
This is a convenience, not automation. No scheduler, no Git hook and no `devp run` \
will ever clear a cache — this only runs when you type it.
Wherever the manager ships its own subcommand, that is what runs: `npm cache clean \
--force`, `pnpm store prune`, `go clean -modcache`. The manager knows what is still \
referenced, which a directory delete cannot work out, and its own bookkeeping stays \
consistent. cargo, gradle, vcpkg and hex ship nothing equivalent, so those \
are cleared by removing the directory this command resolved and sized — never a string \
handed to a shell.
Maven is reported and never cleared. `~/.m2/repository` is an install target as \
well as a download cache — `mvn install:install-file` puts artifacts there that no \
remote can hand back — so dev-prune sizes it and prints `rm -rf ~/.m2/repository` \
for you to run. `clear maven` says so and stops; `clear all` skips it.
Two flags narrow what `all` means, so you do not have to pick the caches by hand. \
`--over-cap` keeps only the managers that have outgrown the ceiling you set in \
`cache_max_gb`; with no cap set anywhere it clears nothing and says so. `--unused` keeps \
only the managers that no registered repository uses — a cache with nothing behind it \
was filled for projects that are not on this disk any more. It counts only repositories \
dev-prune knows about, so `devp link` anything you keep outside the registry first, and \
it refuses to run at all when there are no registered repositories to check against.
Nothing else in a cache is lost; every manager re-downloads what it needs. What it costs \
is time, in every project on the machine, on the next install and the next `devp \
restore`. The freed size reported afterwards is measured rather than assumed, because \
a `prune` keeps what is still in use.";