sklp clean

sklp clean [flags]

Description

Remove what is rebuildable or already dead: the dev build cache, the CI runner caches, orphaned processes and residual cgroups. Running deployments are ALWAYS kept — a live service is not garbage; use `sklp deploy delete` to stop one. --images also clears the OCI image cache (re-pulled next run, and every space's overlay scratch goes with it). --deep tears down idle spaces WITH their named volumes — that is persistent data (a Postgres DB, a NATS store), and deleting a space deletes the space. Every deleted volume is named in the output. Every scope is machine-global: caches are shared by all repositories on this host, so a clean run from one repo affects the others. The host toolchain cache (~/.cache/skt) is never touched. Use --dry-run to preview exactly what would be removed without touching anything.

Flags

FlagAliasesTypeDefaultEnvDescription
--dry-run—bool——print what would be removed, delete nothing
--images—bool——also clear the OCI image cache (re-pulled next run)
--deep—bool——also tear down idle spaces and their volumes (running containers are kept)
--force-fbool——skip the confirmation prompt

Technical details

Technical details

Raw command JSON

{
  "path": [
    "sklp",
    "clean"
  ],
  "slug": "clean",
  "name": "clean",
  "short": "Free disk space: rebuildable caches + dead runtime state (--images, --deep widen it)",
  "long": "Remove what is rebuildable or already dead: the dev build cache, the CI runner\ncaches, orphaned processes and residual cgroups. Running deployments are ALWAYS\nkept — a live service is not garbage; use `sklp deploy delete` to stop one.\n\n--images also clears the OCI image cache (re-pulled next run, and every space's\noverlay scratch goes with it). --deep tears down idle spaces WITH their named\nvolumes — that is persistent data (a Postgres DB, a NATS store), and deleting a\nspace deletes the space. Every deleted volume is named in the output.\n\nEvery scope is machine-global: caches are shared by all repositories on this\nhost, so a clean run from one repo affects the others. The host toolchain cache\n(~/.cache/skt) is never touched.\n\nUse --dry-run to preview exactly what would be removed without touching anything.",
  "synopsis": "sklp clean [flags]",
  "flags": [
    {
      "name": "dry-run",
      "usage": "print what would be removed, delete nothing",
      "type": "bool"
    },
    {
      "name": "images",
      "usage": "also clear the OCI image cache (re-pulled next run)",
      "type": "bool"
    },
    {
      "name": "deep",
      "usage": "also tear down idle spaces and their volumes (running containers are kept)",
      "type": "bool"
    },
    {
      "name": "force",
      "aliases": [
        "f"
      ],
      "usage": "skip the confirmation prompt",
      "type": "bool"
    }
  ]
}

See also