Skip to content

jackin prune

Terminal window
jackin prune <SUBCOMMAND>

jackin prune removes cached or stale data that jackin manages on your host machine. Unlike jackin purge, which targets a specific instance by selector, prune operates in bulk across a category of data.

SubcommandWhat it removes
rolesCached role repositories
cacheShared caches (terminfo, version-check results)
imagesUnused jackin-managed Docker images
instancesOn-disk state for terminated instances
allAll of the above, in order
Terminal window
jackin prune roles

Removes the local role-repo cache. Role repos are re-cloned automatically the next time a role that uses them is launched.

Terminal window
jackin prune cache

Removes the shared cache directory, including compiled terminfo entries and version-check results. All caches regenerate automatically on the next jackin invocation that needs them.

Terminal window
jackin prune images

Removes jk_* Docker images that have no role containers — running or stopped — that depend on them. Images still in use by a role container are skipped; the final summary reports the count of images removed and skipped. Because Docker images are rebuilt from the role Dockerfile on the next jackin load, removing an unused image does not lose any data.

Terminal window
jackin prune instances

Removes on-disk state and index entries for instances in terminal statuses:

StatusPruned?
clean_exitedYes
supersededYes
failed_setupYes
purged (tombstones)Yes — cleared from the index
crashedNo — has recoverable state; use jackin hardline <selector> to return or jackin eject <selector> --purge to discard
preserved_dirtyNo — instance has uncommitted changes
preserved_unpushedNo — instance has unpushed commits
restore_availableNo — local state is still recoverable
active / runningNo — instance is live

Instances that cannot be pruned because Docker resources are still present are listed with a suggestion to use jackin eject <selector> --purge instead.

Terminal window
jackin prune all [--yes]

Runs all four subcommands in order: instancesimagesrolescache. Prompts for confirmation before proceeding unless --yes is passed.

OptionDescription
--yes, -ySkip the confirmation prompt
Terminal window
# Free up disk space from terminated instances
jackin prune instances
# Remove Docker images that are no longer used by any container
jackin prune images
# Remove cloned role repos (will be re-cloned on next launch)
jackin prune roles
# Full cleanup in one command
jackin prune all
# Non-interactive full cleanup (for scripts)
jackin prune all --yes
  • Running instances — containers that are currently attached or running are never stopped or purged by prune.
  • Stopped instances with recovery state — instances with status restore_available, crashed, preserved_dirty, or preserved_unpushed are skipped. Use jackin hardline to reconnect or jackin eject <selector> --purge to explicitly remove them.
  • Operator config~/.config/jackin/config.toml and saved workspaces are never modified by prune.

jackin purge targets a single instance by selector and requires an explicit role, instance ID, or container name. jackin prune instances does the same job in bulk for every instance already in a terminal state, without requiring the operator to name each one.