Installer does not update launcher symlink when upgrading versions
Status Fixed / completed
Reported on v2.1.97
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 4 comments · opened Apr 17, 2026 · closed Apr 17, 2026
Description
When upgrading Claude Code via the install script, the new binary is downloaded and placed in ~/.local/share/claude/versions/<version>, but the launcher symlink at ~/.local/bin/claude is not updated to point to the new version.
Steps to reproduce
# Starting from 2.1.97, install 2.1.112
curl -fsSL https://claude.ai/install.sh | bash -s -- 2.1.112
Installer output says success:
Setting up Claude Code...
✔ Claude Code successfully installed!
Version: 2.1.112
Location: ~/.local/bin/claude
But:
$ claude --version
2.1.97 (Claude Code)
$ ls -l ~/.local/bin/claude
lrwxr-xr-x lance staff ~/.local/bin/claude -> ~/.local/share/claude/versions/2.1.97
$ ls ~/.local/share/claude/versions/
2.1.92 2.1.97 2.1.112
The new binary exists on disk but the symlink still points to the old version.
Expected behavior
After a successful install, ~/.local/bin/claude should be a symlink to the newly installed version (~/.local/share/claude/versions/2.1.112).
Workaround
ln -sfn ~/.local/share/claude/versions/2.1.112 ~/.local/bin/claude
Environment
- macOS (Darwin arm64)
- Shell: zsh
- Claude Code 2.1.97 -> 2.1.112 upgrade
4 Comments
Version-agnostic workaround that handles lexicographic sorting correctly (macOS
ls -vdoes NOT do version sorting like GNUls):sort -Vdoes proper version sorting so2.1.112sorts after2.1.97.Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Closing in favor of https://github.com/anthropics/claude-code/issues/41602
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.