Created
April 6, 2016 17:28
Completely uninstall VirtualBox and Vagrant and reinstall through brew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update brew because `brew update` is broken after updating to El Capitan | |
cd `brew --prefix` | |
git fetch origin | |
git reset --hard origin/master | |
sudo shutdown -r now # restart the computer | |
# open terminal and run the following | |
brew update | |
brew cleanup | |
# remove all the packages with brew | |
brew cask rm virtualbox --force | |
brew cask rm vagrant --force | |
brew cask rm vagrant-manager --force | |
# remove any existing packages that might have been missed | |
rm -rf /Applications/Vagrant* /Applications/VirtualBox | |
sudo rm -f /usr/bin/vagrant /usr/local/bin/vagrant | |
sudo rm -rf /opt/vagrant /opt/homebrew-cask/Caskroom/va* /opt/homebrew-cask/Caskroom/virtualbox | |
rm -rf ~/.vagrant* ~/.docker ~/Virtual* | |
sudo pkgutil --forget com.vagrant.vagrant | |
# reinstall virtualbox vagrant and vagrant-manager | |
brew cleanup | |
brew update --rebase | |
brew upgrade --cleanup | |
brew install vagrant-completion --force | |
brew cask install virtualbox --force | |
brew cask install vagrant --force | |
brew cask install vagrant-manager --force | |
brew upgrade --cleanup | |
brew cleanup | |
brew doctor | |
sudo shutdown -r now | |
echo '' |
Me to @josuevalrob
I am also having the same issue as @josuevalrob and @nevermore6264
Error: brew cask
is no longer a brew
command. Use brew <command> --cask
instead.
# update brew because `brew update` is broken after updating to El Capitan
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
sudo shutdown -r now # restart the computer
# open terminal and run the following
brew update
brew cleanup
# remove all the packages with brew
brew rm virtualbox --force --cask
brew rm vagrant --force --cask
brew rm vagrant-manager --force --cask
# remove any existing packages that might have been missed
rm -rf /Applications/Vagrant* /Applications/VirtualBox
sudo rm -f /usr/bin/vagrant /usr/local/bin/vagrant
sudo rm -rf /opt/vagrant /opt/homebrew-cask/Caskroom/va* /opt/homebrew-cask/Caskroom/virtualbox
rm -rf ~/.vagrant* ~/.docker ~/Virtual*
sudo pkgutil --forget com.vagrant.vagrant
# reinstall virtualbox vagrant and vagrant-manager
brew cleanup
brew update --rebase
brew upgrade --cleanup
brew install vagrant-completion --force
brew install virtualbox --cask --force
brew install vagrant --cask --force
brew install vagrant-manager --cask --force
brew upgrade --cleanup
brew cleanup
brew doctor
sudo shutdown -r now
echo ''
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo pkgutil --forget com.vagrant.vagrant
No receipt for 'com.vagrant.vagrant' found at '/'.