Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.27k stars 9.7k forks source link

Unable to uninstall `adoptopenjdk` cask #12726

Closed PythonCoderAS closed 2 years ago

PythonCoderAS commented 2 years ago

brew config output

HOMEBREW_VERSION: 3.3.10-58-g069ab08
ORIGIN: https://github.com/Homebrew/brew
HEAD: 069ab087f99fd183aee599bf785cb835d5868407
Last commit: 21 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 6e7ef3c8080bcb285cee2d1c6332c46562f49046
Core tap last commit: 6 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.ElGdl325Tp/org.xquartz:0
HOMEBREW_EDITOR: vim
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.8 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/bin/ruby
CPU: quad-core 64-bit kabylake
Clang: 12.0.5 build 1205
Git: 2.30.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.4-x86_64
CLT: 12.5.0.22.11
Xcode: N/A

brew doctor output

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/all/.
You should download the Command Line Tools for Xcode 13.1.

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed with `brew diy`.
You should find replacements for the following formulae:
  python@2

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  ilmbase
  sdl
  sdl_image
  sdl_mixer
  sdl_ttf
  sshfs

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/ffi-x86_64.h
  /usr/local/include/ffi.h
  /usr/local/include/ffitarget-x86_64.h
  /usr/local/include/ffitarget.h

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.pc' files:
  /usr/local/lib/pkgconfig/libffi.pc

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python@2
  imath
  six

Verification

What were you trying to do (and why)?

I am trying to uninstall adoptopenjdk because I don't need it.

What happened (include all command output)?

The cask was reported to be uninstalled.

What did you expect to happen?

The cask to uninstall and not show up on brew list --cask.

Step-by-step reproduction instructions (by running brew commands)

❯ brew list --cask
adobe-acrobat-reader   curseforge             eclipse-java           grammarly              minecraft              qbittorrent            steam                  vlc
adoptopenjdk           daisydisk              fontforge              graphiql               osxfuse                rar                    sublime-text           webstorm
balenaetcher           discord                google-chrome          iterm2                 parsec                 shottr                 teamviewer             zoom
cloudflare-warp        docker                 google-drive           league-of-legends      pycharm                spotify                termius
❯ brew uninstall adoptopenjdk
Error: Cask 'adoptopenjdk' is not installed.
miccal commented 2 years ago

Please run the command

rm -r "$(brew --prefix)/Caskroom/adoptopenjdk"

which should fix your issue.

carlocab commented 2 years ago

brew uninstall should probably know to fall back on that, I think.

yolicap commented 2 years ago

brew uninstall should probably know to fall back on that, I think.

This was very helpful for me as well. Thank you!