How to deal with commands of conflicting names listed in `brew doctor`?

Solution 1:

I don't use casks much, but on my test machine I just tapped the cask infrastructure to see what it installs today. I have the brew-cask.rb file and not the one in /usr/local/bin

If you have a backup system, back up and then delete /usr/local/bin/brew-cask and rerun brew doctor. You could also rename the file if you don't want to hassle with backups.

mv /usr/local/bin/brew-cask /usr/local/bin/ZZdeleteZZbrew-cask
brew doctor

That way a program or script calling the tool won't see the file (or sym link) in /usr/local/bin. You could then test things a bit and clean up the file in question. It also is easier to fix if my hunch that the one in bin is needed somewhere and the tool is wrong to complain about both.

Additionally, there looks like a change was made somewhat recently to cask/brew integration:

  • https://stackoverflow.com/questions/27770168/how-to-uninstall-homebrew-cask

My uninstall steps were different than the ones linked above since I installed cask today and not from before. My results might not match yours in that case :(

Solution 2:

Important December update (from https://github.com/caskroom/homebrew-cask):

Homebrew-Cask will now be kept up to date together with Homebrew.

If you haven’t yet, to switch to the new system, run:

brew uninstall --force brew-cask; brew update 

Solution 3:

You could also remove the cask additions and see if the clean up script removes the remnants:

brew uninstall --force brew-cask

At that point, you can re-run the installation according to the current instructions:

brew tap caskroom/cask

Just the uninstall alone solved your issue for me when I ran across it.

Solution 4:

I faced this exact warning today. For me, simple brew update && brew upgrade && brew doctor worked.

Got finally, the satisfying Your system is ready to brew log.