jdx/mise · error
multiple tools specified, use --all to uninstall all…
Error message
multiple tools specified, use --all to uninstall all versions
What it means
`mise uninstall <tool>` without --all only removes one version per named tool. If the number of resolved tool-version entries exceeds the number of tools named on the command line, multiple versions are targeted and mise requires explicit --all to confirm.
Solutions
- Add --all to remove every installed version: mise uninstall node --all
- Target a single version explicitly: mise uninstall node@22.1.0
- Run `mise ls` first to see how many versions are installed before choosing
Example fix
// before mise uninstall node // after mise uninstall node --all # or: mise uninstall node@22.1.0
Defensive patterns
Strategy: validation
Validate before calling
const info = JSON.parse(exec('mise ls --json')).find(t=>t.tool===name);
const n = info?.installed?.length ?? 0;
exec(n > 1 ? `mise uninstall ${name} --all` : `mise uninstall ${name}`); Type guard
const needsAllFlag = (installedCount: number, namedTools: number) => installedCount > namedTools;
Try / catch
try { exec(`mise uninstall ${name}`); } catch (e) { if (String(e).includes('--all')) exec(`mise uninstall ${name} --all`); else throw e; } Prevention
- Run `mise ls` to count installed versions before uninstalling
- Use explicit version targets (tool@x.y.z) for surgical removals
- Add --all in cleanup scripts that intend full removal
When it happens
Trigger: Running `mise uninstall node` when several node versions are installed, without passing --all; naming a tool that resolves to multiple installed versions in scripts.
Common situations: Upgraded a tool several times leaving multiple versions, then uninstalling by name alone; batch-cleanup scripts that assumed uninstall removes everything.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- failed to uninstall
- package plugin ' ' does not support uninstall; add…
- a branch name is required
- a glob is required
- a repository preview directory requires a dry run
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/f4b4d1b09b7b4c06.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/uninstall.rs:72
impl Uninstall {
pub(super) fn is_dry_run(&self) -> bool {
self.dry_run || self.dry_run_code
}
pub(crate) async fn run(self) -> Result<()> {
let config = Config::get().await?;
let tool_versions = if self.installed_tool.is_empty() && self.all {
self.get_all_tool_versions(&config).await?
} else {
self.get_requested_tool_versions(&config).await?
};
let tool_versions = tool_versions
.into_iter()
.unique_by(|(_, tv)| (tv.request.ba().short.clone(), tv.version.clone()))
.collect::<Vec<_>>();
if !self.all && tool_versions.len() > self.installed_tool.len() {
bail!("multiple tools specified, use --all to uninstall all versions");
}
let removed_install_paths = tool_versions
.iter()
.map(|(_, tv)| tv.install_path())
.collect::<Vec<_>>();
let mpr = MultiProgressReport::get();
let mut to_remove = Vec::with_capacity(tool_versions.len());
for (plugin, tv) in tool_versions {
// `is_version_installed` resolves the install path, so it says no for a link whose
// target is gone -- and that entry is precisely what someone running `uninstall` is
// trying to get rid of. Refusing it left the name occupied with no command able to
// free it. It is still not *installed*: this only decides whether there is something
// here to remove.
if !plugin.is_version_installed(&config, &tv, true)
&& !file::entry_exists(tv.install_path())
{
warn!("{} is not installed", tv.style());View on GitHub (pinned to 533346cc37)