mesheryctl registry purge
Prune old model version directories
Synopsis
Prune older versions of Meshery Models under ./models, retaining only the most recent –retain versions of each model.
Prerequisite: Execute this command from the root of a meshery/meshery repo fork; it operates on the “./models” directory relative to the current working directory.
The “kubernetes” and “meshery-core” models are always excluded from purging, regardless of flags. Use –exclude to skip additional models.
mesheryctl registry purge [flags]
Examples
Retain only the latest version of every model (default).
mesheryctl registry purge
Retain the 3 most recent versions of every model.
mesheryctl registry purge --retain 3
Preview what would be removed without deleting anything.
mesheryctl registry purge --dry-run
Additionally skip specific models.
mesheryctl registry purge --exclude aws-ec2-controller,cilium
Skip the confirmation prompt.
mesheryctl registry purge --retain 2 -y
Options
--dry-run print what would be removed without deleting anything --exclude string comma-delimited list of additional model names to exclude from purging -h, --help help for purge --retain int number of most-recent versions to retain per model (default 1) -y, --yes (optional) assume yes for user interactive prompts.
Options inherited from parent commands
--config string path to config file (default "/home/runner/.meshery/config.yaml") -v, --verbose verbose output
See Also
Go back to command reference index, if you want to add content manually to the CLI documentation, please refer to the instruction for guidance.