Skip to content
SHC Docs

shc node prune

remove images nothing on the node needs

Remove the unused images on each named node, or on every node with --all. An image is removed only when no container on the node is on it, no deployment on the node names it, it is in no deployment’s rollback reserve, and the node can pull it back. Age plays no part here; the node’s own image prune keeps anything pulled or used within 24h.

Prints per node what it removed and what it kept, and why. --dry-run prints the same and removes nothing. A node whose runtime has no image prune removes nothing and says so.

shc node prune <node>... | --all [flags]
shc node prune home05 --dry-run
shc node prune --all
--all prune every node
--dry-run print what would be removed and remove nothing
-h, --help help for prune
--config stringArray extra YAML config file to layer on top of auto-discovered config; repeatable, later files win
-d, --debug enable debug mode (default: $SHC_DEBUG)
-e, --environment string environment name (default: "prod", or "default" on an estate with no licence and no trial; $SHC_ENVIRONMENT and shc ctx -e override it, and the "master" tenant is always "default")
--exclude string comma-separated dotted paths to drop
--fields string comma-separated columns/keys to show (and their order)
--filter string comma-separated dotted paths to keep (drops everything else)
-o, --output string output format: tty|text|json|yaml (default: $SHC_OUTPUT)
-s, --stack string stack name (default: $SHC_STACK)
-t, --tenant string tenant name (default: $SHC_TENANT)
-v, --verbose verbose output (default: $SHC_VERBOSE)
  • shc node - manage and inspect cluster nodes