» Plugin

Command: vagrant plugin

This is the command used to manage plugins.

The main functionality of this command is exposed via another levelof subcommands:

» Plugin Expunge

Command: vagrant plugin expunge

This removes all user installed plugin information. All plugin gems, theirdependencies, and the plugins.json file are removed. This commandprovides a simple mechanism to fully remove all user installed custom plugins.

When upgrading Vagrant it may be required to reinstall plugins due toan internal incompatibility. The expunge command can help make that processeasier by attempting to automatically reinstall currently configuredplugins:

  1. # Delete all plugins and reinstall
  2. $ vagrant plugin expunge --reinstall

This command accepts optional command-line flags:

» Plugin Install

Command: vagrant plugin install <name>…

This installs a plugin with the given name or file path. If the nameis not a path to a file, then the plugin is installed from remoterepositories, usually RubyGems. This command willalso update a plugin if it is already installed, but you can also usevagrant plugin update for that.

  1. # Installing a plugin from a known gem source
  2. $ vagrant plugin install my-plugin
  3. # Installing a plugin from a local file source
  4. $ vagrant plugin install /path/to/my-plugin.gem

If multiple names are specified, multiple plugins will be installed. Ifflags are given below, the flags will apply to all plugins being installedby the current command invocation.

If the plugin is already installed, this command will reinstall it withthe latest version available.

This command accepts optional command-line flags:

  • —entry-point ENTRYPOINT - By default, installed plugins are loadedinternally by loading an initialization file of the same name as the plugin.Most of the time, this is correct. If the plugin you are installing hasanother entrypoint, this flag can be used to specify it.

  • —local - Install plugin to the local Vagrant project only.

  • —plugin-clean-sources - Clears all sources that have been defined sofar. This is an advanced feature. The use case is primarily for corporatefirewalls that prevent access to RubyGems.org.

  • —plugin-source SOURCE - Adds a source from which to fetch a plugin. Notethat this does not only affect the single plugin being installed, by all futureplugin as well. This is a limitation of the underlying plugin installerVagrant uses.

  • —plugin-version VERSION - The version of the plugin to install. By default,this command will install the latest version. You can constrain the versionusing this flag. You can set it to a specific version, such as "1.2.3" oryou can set it to a version constraint, such as "> 1.0.2". You can set itto a more complex constraint by comma-separating multiple constraints:"> 1.0.2, < 1.1.0" (do not forget to quote these on the command-line).

» Plugin License

Command: vagrant plugin license <name> <license-file>

This command installs a license for a proprietary Vagrant plugin,such as the VMware Fusion provider.

» Plugin List

Command: vagrant plugin list

This lists all installed plugins and their respective installed versions.If a version constraint was specified for a plugin when installing it, theconstraint will be listed as well. Other plugin-specific information maybe shown, too.

This command accepts optional command-line flags:

  • —local - Include local project plugins.

» Plugin Repair

Vagrant may fail to properly initialize user installed custom plugins. This canbe caused my improper plugin installation/removal, or by manual manipulation ofplugin related files like the plugins.json data file. Vagrant can attemptto automatically repair the problem.

If automatic repair is not successful, refer to the expungecommand

This command accepts optional command-line flags:

  • —local - Repair local project plugins.

» Plugin Uninstall

Command: vagrant plugin uninstall <name> [<name2> <name3> …]

This uninstalls the plugin with the given name. Any dependencies of theplugin will also be uninstalled assuming no other plugin needs them.

If multiple plugins are given, multiple plugins will be uninstalled.

This command accepts optional command-line flags:

  • —local - Uninstall plugin from local project.

» Plugin Update

Command: vagrant plugin update [<name>]

This updates the plugins that are installed within Vagrant. If you specifiedversion constraints when installing the plugin, this command will respectthose constraints. If you want to change a version constraint, re-installthe plugin using vagrant plugin install.

If a name is specified, only that single plugin will be updated. If aname is specified of a plugin that is not installed, this command will notinstall it.

This command accepts optional command-line flags:

  • —local - Update plugin from local project.