mise prune
- Usage:
mise prune [FLAGS] [INSTALLED_TOOL]… - Effect: destructive — may delete or irreversibly overwrite
- Source code:
src/cli/prune.rs
Delete 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_<TOOL>_VERSION will be deleted, as will versions only referenced on the command line mise exec <TOOL>@<VERSION>.
Tool stubs that have been executed are tracked in ~/.local/state/mise/tracked-stubs. Versions still referenced by a tracked stub are not deleted.
You can list prunable tools with mise ls --prunable
Arguments
[INSTALLED_TOOL]…— Prune only these tools
Flags
-n --dry-run— Do not actually delete anything--configs— Prune only tracked and trusted configuration links that point to nonexistent configurations--dry-run-code— Like --dry-run but exits with code 1 if there are tools to pruneThis is useful for scripts to check if tools need to be pruned.
--monorepo— Placeholder for future monorepo pruning;mise prune --monorepois not implemented yet.--tools— Prune only unused versions of tools-h --help— Print help
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