Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't uninstall virtualbox #15175

Closed
bronson opened this issue Nov 14, 2015 · 3 comments
Closed

Can't uninstall virtualbox #15175

bronson opened this issue Nov 14, 2015 · 3 comments

Comments

@bronson
Copy link
Contributor

bronson commented Nov 14, 2015

Even brew cask uninstall --force can't remove the Virtualbox cask.

$ brew cask uninstall --force virtualbox
==> Running uninstall process for virtualbox; your password may be necessary
==> sudo: /opt/homebrew-cask/Caskroom/virtualbox/5.0.10-104061/VirtualBox_Uninstall.tool: command not found
Error: Command failed to execute!

==> Failed command:
["/usr/bin/sudo", "-E", "--", "#<Pathname:/opt/homebrew-cask/Caskroom/virtualbox/5.0.10-104061/VirtualBox_Uninstall.tool>", "--unattended"]

==> Output of failed command:


==> Exit status of failed command:
#<Process::Status: pid 23432 exit 1>

Apparently I have a lot of virtualboxes lying around, should I just rm -rf /opt/homebrew-cask/Caskroom/virtualbox? (I'm afraid that will leave drivers lying around...)

$ ls /opt/homebrew-cask/Caskroom/virtualbox/
4.3.20-96996 4.3.22-98236 4.3.26-98988 5.0.2-102096
$ brew cask list --verbose
atom         caffeine     gnubg         libreoffice  limechat    pgadmin3
spectacle    vagrant      virtualbox    wkhtmltopdf
$ brew cask doctor
==> OS X Release:
10.10
==> OS X Release with Patchlevel:
10.10.5
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p481
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
0.9.5 (git revision 516e2; last commit 2015-11-13)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local
==> Homebrew Origin:
https://github.com/Homebrew/homebrew
==> Homebrew-cask Version:
0.59.0
==> Homebrew-cask Install Location:
/usr/local/Cellar/brew-cask/0.59.0
==> Homebrew-cask Staging Location:
/opt/homebrew-cask/Caskroom
==> Homebrew-cask Cached Downloads:
/Library/Caches/Homebrew
/Library/Caches/Homebrew/Casks
0 files
0.00 megs
==> Homebrew-cask Default Tap Path:
/usr/local/Library/Taps/caskroom/homebrew-cask
==> Homebrew-cask Alternate Cask Taps:
<NONE>
==> Homebrew-cask Default Tap Cask Count:
2857
==> Contents of $LOAD_PATH:
/usr/local/Cellar/brew-cask/0.59.0/rubylib
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin14
/Library/Ruby/Site/2.0.0/universal-darwin14
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin14
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin14
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin14
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
RUBYOPT=""
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/Users/bronson/.gem/ruby/2.2.2/bin:/Users/bronson/.rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/bin:/Users/bronson/.rubies/ruby-2.2.2/bin:node_modules/.bin:/Users/bronson/node_modules/.bin:/Users/bronson/.nvm/v4.2.1/bin:/usr/local/bin:/usr/local/sbin:/Users/bronson/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/mysql/bin:/usr/local/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_US.UTF-8"
==> Running As Privileged User:
No
@vitorgalvao
Copy link
Member

There’s some inconsistency between the versions you seem to have installed (4.3.20-96996 4.3.22-98236 4.3.26-98988 5.0.2-102096) and the one we’re trying to remove (5.0.10-104061). We can’t really know where the issue was and #13201 will mitigate this, so we shouldn’t waste too much time on this.

Go to /opt/homebrew-cask/Caskroom/virtualbox/, find the latest version, and run the VirtualBox_Uninstall.tool inside it. After that, you may delete /opt/homebrew-cask/Caskroom/virtualbox/.

@bronson
Copy link
Contributor Author

bronson commented Nov 15, 2015

That makes sense, great instructions. Thanks!!

@petrkotek
Copy link

Note: the new location of Caskroom is /usr/local/Caskroom, so you need to:

  • uninstall old virtualbox manually by /usr/local/Caskroom/virtualbox/$VERSION/VirtualBox_Uninstall.tool
  • delete old virtualbox cask manually rm -r /usr/local/Caskroom/virtualbox
  • and then you can finally install new version brew cask install Caskroom/cask/virtualbox

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants