26

I want to uninstall Vagrant on a mac running El Capitan.

The Vagrant docs say:

On Mac OS X, remove the /Applications/Vagrant directory and the /usr/bin/vagrant file. Also execute sudo pkgutil --forget com.vagrant.vagrant to have OS X forget that Vagrant was ever installed.

However, there is no /Applications/Vagrant directory, and there's no /usr/bin/vagrant file:

➜  ~  ls /usr/bin/va*
zsh: no matches found: /usr/bin/va*
➜  ~  ls /Applications/Vagrant
ls: /Applications/Vagrant: No such file or directory

I've reinstalled Vagrant 1.7.4 just to make sure that it's actually there, and I can verify:

➜  ~  vagrant --version
Vagrant 1.7.4

Any idea what's up? Are the docs just out of date?

user101289
  • 9,888
  • 15
  • 81
  • 148

4 Answers4

36

Download the installer again. In there is an uninstall script called uninstall.tool

Run the uninstaller from terminal: ./uninstall.tool

JacoE
  • 376
  • 3
  • 4
16

Use this on Mac osX

rm -rf /Applications/Vagrant
rm -f /usr/local/bin/vagrant
sudo pkgutil --forget com.vagrant.vagrant
rm -rf ~/.vagrant.d
Ankesh Khemani
  • 191
  • 1
  • 4
8

The Vagrant team has published detailed instructions for all platforms:

https://www.vagrantup.com/docs/installation/uninstallation.html

On Mac OS X:

sudo rm -rf /opt/vagrant /usr/local/bin/vagrant
sudo pkgutil --forget com.vagrant.vagrant
raveren
  • 17,799
  • 12
  • 70
  • 83
djGrill
  • 1,480
  • 2
  • 14
  • 10
  • 1
    This is the acceptable answer as of May 2019. Just in case you need to run the `./unistall.tool` with sudo or just need to examine it, when you click on the vagrant dmg file you downloaded and the application installation box is launched, you can navigate to the uninstall.tool with your terminal. `cd /Volumes/Vagrant` – jmuchiri May 18 '19 at 17:50
5

Use this instructions for Linux:

rm -rf /opt/vagrant
rm -f /usr/bin/vagrant
Gautam Savaliya
  • 1,403
  • 2
  • 20
  • 31
Ean White
  • 51
  • 1
  • 2
  • Helped me. After ``` rm -rf /Applications/Vagrant rm -f /usr/local/bin/vagrant sudo pkgutil --forget com.vagrant.vagrant rm -rf ~/.vagrant.d ``` still had vagrant available. – Rootical V. Nov 13 '16 at 13:04