docs/cli/prune.md
mise prunemise prune [FLAGS] [INSTALLED_TOOL]…src/cli/prune.rsDelete unused versions of tools
mise tracks which config files have been used in ~/.local/state/mise/tracked-configs
Versions which are no longer the latest specified in any of those configs are deleted.
Versions installed only with environment variables MISE_<PLUGIN>_VERSION will be deleted,
as will versions only referenced on the command line mise exec <PLUGIN>@<VERSION>.
You can list prunable tools with mise ls --prunable
[INSTALLED_TOOL]…Prune only these tools
-n --dry-runDo not actually delete anything
--configsPrune only tracked and trusted configuration links that point to non-existent configurations
--dry-run-codeLike --dry-run but exits with code 1 if there are tools to prune
This is useful for scripts to check if tools need to be pruned.
--toolsPrune only unused versions of tools
Examples:
$ mise prune --dry-run
rm -rf ~/.local/share/mise/versions/node/20.0.0
rm -rf ~/.local/share/mise/versions/node/20.0.1