containers-podmanlisted
Install: claude install-skill th3r-dev/th3-skills
# Podman: disk reclaim
`scripts/reclaim.py` uses only the Python standard library (3.9+). What it does depends on the OS:
| OS | Where Podman storage lives | Steps the script runs |
|---|---|---|
| Linux | Host filesystem, native Podman | prune |
| macOS | Podman machine, sparse raw disk | prune, `fstrim` in the machine |
| Windows | Podman machine, WSL2 `ext4.vhdx` | prune, `fstrim`, stop, `wsl --shutdown`, diskpart compact, start |
On Windows, the WSL vhdx grows but never shrinks. `podman system prune` frees space inside the VM, but the host file stays the same size until it is compacted.
## Workflow
### 1. Measure first (always)
```sh
python scripts/reclaim.py --dry-run
```
This prints `podman system df`, the vhdx size on the host (Windows only), and the planned steps. It changes nothing. Read the output:
- **The vhdx is much bigger than the in-use SIZE.** Compaction alone recovers most of the space. Suggest `--skip-prune` if the user wants to keep every image.
- **RECLAIMABLE is high on Images.** A default run is the right call.
### 2. Confirm before deleting
Pruning images is destructive. Public images are cheap to pull again, but locally built ones are not. Before a real run, show the user what will be removed and get a yes. Ask separately before using either of these flags:
- `--containers` removes **stopped** containers along with their writable layers. A stopped dev database is one example of what this deletes.
- `--volumes` removes volumes that no contain