mise unuse
- 用法:
mise unuse [FLAGS] <INSTALLED_TOOL@VERSION>… - 别名:
rm、remove - 效果: 具有破坏性 — 可能删除或不可逆地覆盖
- 源代码:
src/cli/unuse.rs
Remove tool requests from config files and prune unused installations
Without --path, --global, or --env, mise edits the first loaded config that declares one of the tools; in your home directory it edits the global config. A version argument matches the configured request literally: to remove node = "20", use mise unuse node@20, not the installed version it resolved to. Omit the version to remove every request for that tool from the selected file.
Versions are pruned only when no remaining tracked config or tool stub needs them. Pass --no-prune to edit the config and keep the installations. To remove an installation without editing config, use mise uninstall.
Arguments
<INSTALLED_TOOL@VERSION>…— Tools to remove from the config, with the version written as in the config
Flags
-e --env <ENV>— Edit mise.<ENV>.toml in the current directory, or .mise.<ENV>.toml if that existsNot the same as the global -E, which only chooses which config files are loaded.
-g --global— Use the global config file (~/.config/mise/config.toml) instead of the local one-p --path <PATH>— Edit this config file, or the config file in this directory别名:
--file--no-prune— 不要同时清理已安装的版本-h --help— 打印帮助信息
示例
Remove [email protected] from mise.toml and uninstall it if nothing else uses it
mise unuse [email protected]Remove it from the global config instead
mise unuse -g [email protected]Remove the node@20 request from mise.staging.toml
mise unuse --env staging node@20