18

When brew cleanup shows the following error message:

Error: Cask adoptopenjdk8 exists in multiple taps:
  homebrew/cask-versions/adoptopenjdk8
  adoptopenjdk/openjdk/adoptopenjdk8

How can I resolve this error without reinstalling Homebrew?

FYI some relevant references:

4 Answers 4

19

Here is a quick solution which assumes that Homebrew is up-to-date and there is no need to use any other packages from the adoptopenjdk/openjdk tap:

Check the state of adoptopenjdk/openjdk tap and adoptopenjdk8 package:

  • brew tap - lists which taps are currently enabled
  • brew search adoptopenjdk8 - shows which adoptopenjdk8 casks are available from the enabled taps and which adoptopenjdk8 casks are currently installed

Now assuming that the adoptopenjdk/openjdk tap is listed as enabled, remove the adoptopenjdk/openjdk tap as follows:

brew untap adoptopenjdk/openjdk

Then check what adoptopenjdk8 casks are currently installed. This should show exactly one adoptopenjdk8 cask installed.

At this point, brew cleanup should work correctly.

My explanation: it appears to me that they added adoptopenjdk8 to the built-in Homebrew caskroom.

Note that it should be OK to do brew tap adoptopenjdk/openjdk afterwards, if needed. (This has not caused any issues for me so far.)

1
  • Works great, OP if this worked for you please mark it as answered Jul 15, 2019 at 13:53
1

I resoved this problem as follows commands:

brew uninstall adoptopenjdk/openjdk/adoptopenjdk8
0

Another quick solution: remove cask file

sudo rm /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions/Casks/adoptopenjdk8.rb
2
  • Welcome to Ask Different. Posts should be more than just 1 line. See How to Answer for tips on providing answers here. You can edit your post to add info such as why you're proposing this solution or why it's different than the one already provided.
    – fsb
    Sep 5, 2019 at 13:19
  • This worked for me - after other suggestions including highly voted one above did not. thanks! Sep 7, 2019 at 19:06
0

I resolved with

$ brew uninstall adoptopenjdk/openjdk/adoptopenjdk8
==> Uninstalling Cask adoptopenjdk8
==> Uninstalling packages; your password may be necessary:
net.adoptopenjdk.8.jdk
Password:
==> Purging files for version 8,292:b10 of Cask adoptopenjdk8
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .