Four levels. Level 4 = full purge incl. GHCR prebuilts and builder cache.
clean.sh only handles the main docker-compose.yml (ghost-machine*).
Tenants use tenant.sh delete — they are a separate Compose project (ghost-tenant-<id>).
| Level | Command | Effect | When |
|---|---|---|---|
| 1 | ./clean.sh -s | down — containers + network | Stop for the day, keep work + images |
| 2 | ./clean.sh -v | down -v — incl. Docker volumes | Volumes are unused here (bind mounts), so rarely needed |
| 3 | ./clean.sh -a -y | down -v --rmi local + rmi *-template:latest (ubuntu/debian/alpine/arch) | Rebuild from scratch, free ~1 GB local image per engine |
| 4 | ./clean.sh --nuke -y | L3 + rmi ghcr.io/1999azzar/ghost-machine-*:latest + builder prune | Full purge — GHCR prebuilts (~1.2–1.6 GB each) + Buildx cache |
| 4 hard | ./clean.sh --nuke --hard -y | L4 + wipe mounts/ | True 1st-user nuke (also clears host work) |
| Data | Location | Removed by |
|---|---|---|
| Your code / home | mounts/* (bind mounts) | Never by clean.sh — manual rm |
| Tenant homes | mounts/tenants/<id> | tenant.sh delete |
| Local built images | *-template:latest | L3 / L4 |
| GHCR prebuilts | ghcr.io/1999azzar/ghost-machine-*:latest | Only L4 (--nuke) |