← ClaudeAtlas

containers-podmanlisted

Use this skill when Podman eats too much disk on Windows, macOS, or Linux. Triggers include "podman storage too big", a Podman machine disk or ext4.vhdx that keeps growing, a drive filling up, too many container images, or any request to prune, clean up, shrink, or compact Podman. One cross-platform Python script prunes unused images (stopped containers and volumes only on request), runs fstrim inside the Podman machine, and on Windows compacts the WSL vhdx with diskpart so the space actually returns to the host. Pruning alone does NOT shrink a WSL vhdx; this skill handles every step.
th3r-dev/th3-skills · ★ 2 · AI & Automation · score 66
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