struo cache gc

Reclaim local cache space down to a size budget.

Synopsis#

plaintext
struo cache gc [OPTIONS]

Description#

Removes the least recently used blobs and action results until the local store fits within --max-size, defaulting to STRUO_CACHE_MAX_SIZE, then [local_cache] max_size in the root struo.toml, then 20 GB when the flag is omitted or that cap is 0. Build, test, run, lint, and exec already collect over that cap in the background at most once an hour, sparing anything used in the last hour; this command reclaims on demand and spares only entries used while it runs. An action whose outputs get evicted re-executes on its next build. Only the local tier is collected; a remote cache is never touched.

Options#

FlagValueDefaultDescription
--max-size<SIZE>Maximum local cache size to keep. Plain bytes or a human suffix: 500MB, 2GiB, 750k. Decimal suffixes (KB/MB/GB/ TB) are powers of 1000; binary suffixes (KiB/MiB/GiB/TiB) are powers of 1024. Defaults to STRUO_CACHE_MAX_SIZE, then [local_cache] max_size in struo.toml, then 20 GB; a cap of 0 also means 20 GB here.
--dry-run(flag)Report what would be reclaimed without deleting anything.