[BUG] Claude Code (Homebrew cask) silently removed during unrelated `brew install --cask`
Resolved 💬 4 comments Opened Jan 13, 2026 by cengizdilber Closed Mar 6, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
No explicit brew cleanup or brew uninstall was run. The removal happened silently during another cask installation, without any warning.
After the incident:
which claudereturned nothing/usr/local/Caskroom/claude-code/was empty- Had to reinstall manually with
brew install --cask claude-code
What Should Happen?
Installing unrelated Homebrew casks should NOT affect existing Claude Code installation.
Expected:
- Claude Code should remain installed when other casks are installed
- If removal is necessary, user should receive a warning
- Homebrew auto-cleanup should not silently remove actively used applications
Error Messages/Logs
No explicit error was shown. The removal was silent.
Evidence from filesystem:
- Original install: Unknown exact time
- Cask installations: Jan 13, 16:24-16:25
- Claude Code missing: Discovered ~16:30
- Reinstall timestamp: Jan 13, 23:06
Homebrew cache .cleaned file was dated Jan 9, not today.
Homebrew does not keep detailed removal logs.
Steps to Reproduce
- Have Claude Code installed via
brew install --cask claude-code - Run
brew install --cask iterm2(or other cask) - Run
brew install --cask font-fira-code(optional, I ran multiple) - Claude Code gets removed without warning
which claudereturns nothing
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown - was working before iterm2 installation
Claude Code Version
2.1.6
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- This happened during an active Claude Code session (ironic!)
- Homebrew logs were not available to confirm exact deletion cause
- The .cleaned file in Homebrew cache was dated Jan 9, not today
- Workaround:
export HOMEBREW_NO_INSTALL_CLEANUP=1in ~/.zshrc
System details:
- macOS: 15.7.3 (Darwin 24.6.0)
- Homebrew: 5.0.10
- Chip: Intel
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗