Skip to content

fix(uninstall): remove the alias links of the last uninstalled version - #15605

Merged
jdx merged 1 commit into
mainfrom
claude/mise-discussion-15595-b6025e
Nov 11, 2026
Merged

jdx merged 1 commit into
mainfrom
claude/mise-discussion-15595-b6025e

Conversation

@jdx

@jdx jdx commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

mise uninstall left ~/.local/share/mise/installs/<tool>/ behind after the last version was removed. The folder held only dangling alias links (latest, global, 5, 5.1):

$ mise uninstall --all cheat
$ ls -A ~/.local/share/mise/installs/cheat
5  5.1  global  latest

Now the links and the empty folder are removed together with the last version.

Fixes #15595.

Cause

The empty-folder cleanup counts subdirectories, and a link whose target is gone does not count, so the folder looked empty. It deleted .mise.backend.toml but not the links. Without that file the tool no longer counts as installed, so the runtime-symlink rebuild never visited the folder again.

The cleanup now drops dangling runtime links first.

Test

e2e/cli/test_uninstall asserts the tool folder is gone after the last version is uninstalled. Also checked by hand with cheat@5 on macOS.

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.

🤖 Generated with Claude Code


Note

Low Risk
Localized uninstall cleanup change with a focused e2e test; no auth, data, or core install path changes beyond empty-directory handling.

Overview
mise uninstall --all no longer leaves an empty installs/<tool>/ directory full of dangling alias symlinks (latest, global, version aliases) after the last version is removed.

Empty-install-dir cleanup now calls remove_missing_symlinks_in_dir before dropping .mise.backend.toml and removing the folder, because dir_subdirs treats broken symlinks as “not there,” so the directory looked empty while links remained.

An e2e check in test_uninstall asserts the tool install path (and latest link) are gone after uninstalling all versions.

Reviewed by Cursor Bugbot for commit 05a5fe9. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M75HMP8EG3AER0KVXZXK27GA
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 531bdb9 and 05a5fe9.

Files selected for processing: 2

  • e2e/cli/test_uninstall
  • src/backend/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the test quoting issue is non-blocking.

Fix All in Claude CodeFindings

  1. P2 Spaces hide cleanup failures ▶

Summary

Removes dangling runtime links before deleting the last version's tool folder.

  • A tool's empty install folder disappears with its dangling aliases after uninstall.

Reviews (3) · Last reviewed commit: "fix(uninstall): remove the alias links o..." · Reviewed by Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env █▅▇▅▁ 40,685,660 → 40,570,122 -0.28% 22.51 → 22.37ms -0.62%
hook-env ▆▇█▆▁ 43,000,484 → 42,893,440 -0.25% 23.30 → 23.90ms +2.56%
ls ▁▇█▇▄ 45,424,692 → 45,274,740 -0.33% 25.24 → 25.22ms -0.09%
registry ▇▇█▆▁ 45,106,149 → 44,954,306 -0.34% 19.12 → 19.60ms +2.49%
startup ▁█▇▇▆ 12,771,250 → 12,718,473 -0.41% 12.91 → 13.23ms +2.49%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

05a5fe9f610a vs 531bdb947215 · measured on the runner, not pushed to the history.

@jdx
jdx merged commit 3ab2df0 into main Nov 11, 2026
63 of 68 checks passed
@jdx
jdx deleted the claude/mise-discussion-15595-b6025e branch November 11, 2026 20:45
Comment thread e2e/cli/test_uninstall
assert_not_contains "mise ls dummy" "2.0.1"
assert_not_contains "mise ls dummy" "2.1.0"
# the alias links and the tool folder go with the last version
assert_fail "test -e $MISE_DATA_DIR/installs/dummy || test -L $MISE_DATA_DIR/installs/dummy/latest"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Spaces hide cleanup failures

If MISE_DATA_DIR contains spaces, both unquoted paths split into extra arguments when assert_fail runs the string through bash -c. Both test commands then fail even if the folder still exists, so the assertion passes without checking cleanup. Quote both paths inside the command string.

Suggested change
assert_fail "test -e $MISE_DATA_DIR/installs/dummy || test -L $MISE_DATA_DIR/installs/dummy/latest"
assert_fail "test -e '$MISE_DATA_DIR/installs/dummy' || test -L '$MISE_DATA_DIR/installs/dummy/latest'"

Fix in Claude Code

jdx pushed a commit that referenced this pull request Nov 13, 2026
### 🚀 Features

- **(dotfiles)** warn when a copy target was edited since mise wrote it
by @jdx in [#15600](#15600)
- **(task)** infer root package.json scripts for npm and Bun workspaces
by @jdx in [#15616](#15616)

### 🐛 Bug Fixes

- **(bootstrap)** keep the brew rack lock out of the Cellar so
uninstalled formulae disappear by @jdx in
[#15597](#15597)
- **(bootstrap)** refuse to archive a home directory or oversized source
in bootstrap remote by @jdx in
[#15607](#15607)
- **(bootstrap)** build brew formulae from source in a clean environment
by @jdx in [#15613](#15613)
- **(completions)** complete the next task after `:::` by @jdx in
[#15614](#15614)
- **(config)** let project tool_alias override global aliases by @jdx in
[#15615](#15615)
- **(doctor)** stop warning about the backend a packageManager checksum
forces by @jdx in [#15604](#15604)
- **(pipx)** run an installed github git source with no releases offline
by @jdx in [#15602](#15602)
- **(sandbox)** allow `./` relative paths on macOS by @jdx in
[#15599](#15599)
- **(task)** complete bare root task names in a monorepo by @jdx in
[#15598](#15598)
- **(uninstall)** remove the alias links of the last uninstalled version
by @jdx in [#15605](#15605)

### 📚 Documentation

- only accept bug reports from real use by @jdx in
[e9bf531](e9bf531)

### Chore

- **(ci)** run cargo-deny advisories only when dependencies change by
@jdx in [#15601](#15601)

## 📦 Aqua Registry Updates

### New Packages (1)

-
[`connectrpc/protoc-gen-connect-openapi`](https://github.com/connectrpc/protoc-gen-connect-openapi)

### Updated Packages (7)

- [`dependabot/cli`](https://github.com/dependabot/cli)
- [`git-bug/git-bug`](https://github.com/git-bug/git-bug)
- [`github/gh-ost`](https://github.com/github/gh-ost)
- [`helmfile/helmfile`](https://github.com/helmfile/helmfile)
- `kiro.dev/kiro-cli`
- [`matthart1983/netwatch`](https://github.com/matthart1983/netwatch)
- [`modem-dev/hunk`](https://github.com/modem-dev/hunk)
gabrielcosi pushed a commit to gabrielcosi/home-ops that referenced this pull request Nov 14, 2026
… (#1754)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/jdx/mise](https://github.com/jdx/mise) | patch | `2026.11.7` → `2026.11.8` |

---

### Release Notes

<details>
<summary>jdx/mise (ghcr.io/jdx/mise)</summary>

### [`v2026.11.8`](https://github.com/jdx/mise/blob/HEAD/CHANGELOG.md#2026118---2026-11-13)

[Compare Source](jdx/mise@v2026.11.7...v2026.11.8)

##### 🚀 Features

- **(bootstrap)** plan repositories and hooks in bootstrap plan by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15653](jdx/mise#15653)
- **(bootstrap)** load package manager plugins from system plugin directories by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15620](jdx/mise#15620)
- **(bootstrap)** add bootstrap settings plugins by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15621](jdx/mise#15621)
- **(bootstrap)** move macOS preferences to \[bootstrap.settings.macos] by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15622](jdx/mise#15622)
- **(config)** support block edits in bootstrap files by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15650](jdx/mise#15650)
- **(dotfiles)** warn when a copy target was edited since mise wrote it by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15600](jdx/mise#15600)
- **(github)** add versions_host_exclude to keep repos off mise-versions by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15666](jdx/mise#15666)
- **(shim)** expose the call's arguments as argv in wrapper templates by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15655](jdx/mise#15655)
- **(task)** infer root package.json scripts for npm and Bun workspaces by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15616](jdx/mise#15616)

##### 🐛 Bug Fixes

- **(activate)** skip resolving WSL Windows drive entries on PATH by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15665](jdx/mise#15665)
- **(backend)** reuse Ruby's bundled gems when installing gem: tools by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15644](jdx/mise#15644)
- **(bootstrap)** keep the brew rack lock out of the Cellar so uninstalled formulae disappear by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15597](jdx/mise#15597)
- **(bootstrap)** refuse to archive a home directory or oversized source in bootstrap remote by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15607](jdx/mise#15607)
- **(bootstrap)** build brew formulae from source in a clean environment by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15613](jdx/mise#15613)
- **(completions)** complete the next task after `:::` by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15614](jdx/mise#15614)
- **(config)** let project tool_alias override global aliases by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15615](jdx/mise#15615)
- **(config)** write \_.file for Load .env in the interactive editor by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15640](jdx/mise#15640)
- **(config)** resolve tool_alias names in minimum_release_age_excludes by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15638](jdx/mise#15638)
- **(doctor)** stop warning about the backend a packageManager checksum forces by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15604](jdx/mise#15604)
- **(env)** ignore unrelated file churn in config directories on the hook-env fast path by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15667](jdx/mise#15667)
- **(http)** hard link shared raw files on Windows instead of copying by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15647](jdx/mise#15647)
- **(lock)** send the forge token when fetching a private release's checksum file by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15637](jdx/mise#15637)
- **(lock)** error on tool arguments that match no configured tool by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15649](jdx/mise#15649)
- **(node)** resolve symlinks in the npm shim by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15664](jdx/mise#15664)
- **(npm)** find the installed digest for a tarball URL at latest in hook-env by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15643](jdx/mise#15643)
- **(pipx)** run an installed github git source with no releases offline by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15602](jdx/mise#15602)
- **(pypi)** lock the graph for the configured python and keep an existing graph on failure by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15657](jdx/mise#15657)
- **(sandbox)** allow `./` relative paths on macOS by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15599](jdx/mise#15599)
- **(spm)** record artifact bundle URLs and checksums in mise.lock by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15646](jdx/mise#15646)
- **(task)** complete bare root task names in a monorepo by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15598](jdx/mise#15598)
- **(task)** recognise --MISE and --USAGE comments in Lua file tasks by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15659](jdx/mise#15659)
- **(task)** list a task pattern's cache entries in one pass by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15671](jdx/mise#15671)
- **(uninstall)** remove the alias links of the last uninstalled version by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15605](jdx/mise#15605)
- **(vfox)** verify the lockfile checksum in locked mode by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15648](jdx/mise#15648)

##### 🚜 Refactor

- **(system)** resolve bootstrap packages once for status by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15641](jdx/mise#15641)

##### 📚 Documentation

- **(config)** clarify global_config_file does not hide \~/.config/mise from projects under home by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15639](jdx/mise#15639)
- only accept bug reports from real use by [@&#8203;jdx](https://github.com/jdx) in [e9bf531](jdx/mise@e9bf531)

##### 📦 Registry

- drop archived asdf plugin backends by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15642](jdx/mise#15642)

##### Chore

- **(ci)** run cargo-deny advisories only when dependencies change by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15601](jdx/mise#15601)

##### Ci

- email when the docs build fails on the default branch by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;15652](jdx/mise#15652)

##### 📦 Aqua Registry Updates

##### New Packages (2)

- [`cfgaudit/cfgaudit`](https://github.com/cfgaudit/cfgaudit)
- [`connectrpc/protoc-gen-connect-openapi`](https://github.com/connectrpc/protoc-gen-connect-openapi)

##### Updated Packages (8)

- [`dependabot/cli`](https://github.com/dependabot/cli)
- [`entireio/git-sync`](https://github.com/entireio/git-sync)
- [`git-bug/git-bug`](https://github.com/git-bug/git-bug)
- [`github/gh-ost`](https://github.com/github/gh-ost)
- [`helmfile/helmfile`](https://github.com/helmfile/helmfile)
- `kiro.dev/kiro-cli`
- [`matthart1983/netwatch`](https://github.com/matthart1983/netwatch)
- [`modem-dev/hunk`](https://github.com/modem-dev/hunk)

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/Berlin)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMzkuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjIzOS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.xcd.dev/gabrielcosi/home-ops/pulls/1754
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant