cache:prune
Introduction
cache:prune deletes the cache entries no product references, then the broken feature links in every product. Run it to win back disk space from old versions without touching anything in use.
splent cache:prune
Orphaned entries to remove (2):
- splent_io/splent_feature_notes@v1.0.0
- splent_io/splent_feature_cache@v1.0.0
Remove all of the above? [y/N]: y
🧹 Pruned 2 orphaned cache entry/entries.
✅ No broken symlinks found.
It finds the orphans exactly as cache:orphans does, so run that first to see the list without deleting anything.
Pruning without the question
splent cache:prune --yes
--yes skips the confirmation, for scripts and CI.
Getting an entry back
A deleted entry cannot be recovered locally. product:resolve downloads again everything a product declares, and feature:clone one feature.
Reference
| Option | Description |
|---|---|
--yes |
Do not ask for confirmation |
| Situation | Result |
|---|---|
A product’s pyproject.toml cannot be parsed |
Nothing is deleted, exit 1. Every entry it pins would look orphaned, so fix it first |
| An entry cannot be deleted, such as a root-owned file a container wrote | Could not delete <entry>: <error>, the others go on, exit 1 at the end |
A fork under another namespace, such as alice/splent_feature_notes@v1.2.7, while products pin splent-io/... |
Pruned, since it is an orphan |
When a pyproject.toml cannot be read it prints one line per directory.
cache:prune stopped because these pyproject.toml files could not be read.
- <dir>/pyproject.toml (<error>)
Every entry they pin would look orphaned. Fix them and run cache:prune again. Nothing was deleted.