Solvedhomebrew openjdk Cask adoptopenjdk8 exists in multiple taps

When I try to run brew cask upgrade, I get the following error message:

$ brew cask upgrade
==> Casks with `auto_updates` or `version :latest` will not be upgraded
==> Upgrading 1 outdated package:
caskroom/versions/adoptopenjdk8 8,202:b08 -> 8,212:b03
Error: Cask adoptopenjdk8 exists in multiple taps:
  caskroom/versions/adoptopenjdk8
  adoptopenjdk/openjdk/adoptopenjdk8

This is because I use both taps caskroom/versions and AdoptOpenJDK/openjdk.

I just wonder what is the proper way to workaround this issue?

29 Answers

✔️Accepted Answer

I think AdoptOpenJDK8 should be removed from the homebrew-cask-versions repo. Somone(TM) should probably create an issue there. :-)

In the meantime I just deleted the file from my local tap folder as a workaround
rm /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions/Casks/adoptopenjdk8.rb

Other Answers:

@mfriedenhagen Fellow user here; brew untap adoptopenjdk/openjdk and brew untap caskroom/versions seem the best known workarounds for cleanup, per discussion in Homebrew/homebrew-cask-versions#7260.

Until this is fixed, you can simply use brew cask install adoptopenjdk/openjdk/adoptopenjdk8. 😄

@dfrankow that's a different issue (that I also ran into recently) caused by homebrew moving caskroom/versions into homebrew/cask-versions.

brew untap caskroom/versions should fix the issue.

A quick workaround solution may to remove the adoptopenjdk/openjdk tap:

brew untap adoptopenjdk/openjdk

For some more details: https://apple.stackexchange.com/questions/360567/what-if-there-is-an-error-message-that-adoptopenjdk8-exists-in-multiple-taps/360568

P.S. This problem did not reappear after I did brew tap adoptopenjdk/openjdk again.

More Issues: