jackin prune
Synopsis
Section titled “Synopsis”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.
Subcommands
Section titled “Subcommands”| Subcommand | What it removes |
|---|---|
roles | Cached role repositories |
cache | Shared caches (terminfo, version-check results) |
images | Unused jackin-managed Docker images |
instances | On-disk state for terminated instances |
all | All of the above, in order |
jackin prune roles
Section titled “jackin prune roles”jackin prune rolesRemoves the local role-repo cache. Role repos are re-cloned automatically the next time a role that uses them is launched.
jackin prune cache
Section titled “jackin prune cache”jackin prune cacheRemoves the shared cache directory, including compiled terminfo entries and version-check results. All caches regenerate automatically on the next jackin invocation that needs them.
jackin prune images
Section titled “jackin prune images”jackin prune imagesRemoves 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.
jackin prune instances
Section titled “jackin prune instances”jackin prune instancesRemoves on-disk state and index entries for instances in terminal statuses:
| Status | Pruned? |
|---|---|
clean_exited | Yes |
superseded | Yes |
failed_setup | Yes |
purged (tombstones) | Yes — cleared from the index |
crashed | No — has recoverable state; use jackin hardline <selector> to return or jackin eject <selector> --purge to discard |
preserved_dirty | No — instance has uncommitted changes |
preserved_unpushed | No — instance has unpushed commits |
restore_available | No — local state is still recoverable |
active / running | No — 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.
jackin prune all
Section titled “jackin prune all”jackin prune all [--yes]Runs all four subcommands in order: instances → images → roles → cache. Prompts for confirmation before proceeding unless --yes is passed.
Options
Section titled “Options”| Option | Description |
|---|---|
--yes, -y | Skip the confirmation prompt |
Examples
Section titled “Examples”# Free up disk space from terminated instancesjackin prune instances
# Remove Docker images that are no longer used by any containerjackin prune images
# Remove cloned role repos (will be re-cloned on next launch)jackin prune roles
# Full cleanup in one commandjackin prune all
# Non-interactive full cleanup (for scripts)jackin prune all --yesWhat prune does not touch
Section titled “What prune does not touch”- 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, orpreserved_unpushedare skipped. Usejackin hardlineto reconnect orjackin eject <selector> --purgeto explicitly remove them. - Operator config —
~/.config/jackin/config.tomland saved workspaces are never modified byprune.
Relationship to jackin purge
Section titled “Relationship to jackin purge”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.