{"record":{"id":"e64bf88ad92c2111","repo":"hashicorp/vagrant","slug":"the-plugin-name-is-not-currently-installed-e64bf8","errorCode":null,"errorMessage":"The plugin '%{name}' is not currently installed.","messagePattern":"The plugin '%(.+?)' is not currently installed\\.","errorType":"exception","errorClass":"Vagrant::Errors::PluginNotInstalled","httpStatus":null,"severity":"error","filePath":"plugins/commands/plugin/action/plugin_exists_check.rb","lineNumber":19,"sourceCode":"# Copyright IBM Corp. 2010, 2025\n# SPDX-License-Identifier: BUSL-1.1\n\nrequire \"vagrant/plugin/manager\"\n\nmodule VagrantPlugins\n  module CommandPlugin\n    module Action\n      # This class checks to see if the plugin is installed already, and\n      # if so, raises an exception/error to output to the user.\n      class PluginExistsCheck\n        def initialize(app, env)\n          @app    = app\n        end\n\n        def call(env)\n          installed = Vagrant::Plugin::Manager.instance.installed_plugins\n          if !installed.key?(env[:plugin_name])\n            raise Vagrant::Errors::PluginNotInstalled,\n              name: env[:plugin_name]\n          end\n\n          @app.call(env)\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/plugin/action/plugin_exists_check.rb#L1-L29","documentation":"The PluginExistsCheck middleware runs before uninstall/update/license plugin actions. It looks up env[:plugin_name] in Vagrant::Plugin::Manager.instance.installed_plugins (backed by ~/.vagrant.d/plugins.json, or the project-local .vagrant/plugins.json for --local) and raises Vagrant::Errors::PluginNotInstalled when the name is not a key. The name must match the installed gem name exactly.","triggerScenarios":"`vagrant plugin uninstall aws` when the gem is actually installed as vagrant-aws; the plugin was already removed; VAGRANT_HOME changed so the manager reads a different plugins.json; using --local when the plugin is installed globally (or vice versa).","commonSituations":"Gem name vs human name mismatch; a failed `vagrant plugin expunge` leaving plugins.json empty; new machines or CI runners that never had the plugin installed.","solutions":["List exact installed names: `vagrant plugin list`.","Re-run the command with the exact name shown in that list.","If the plugin lives in the project scope, add --local (and drop it for global scope).","If plugins.json was wiped, reinstall first: `vagrant plugin install <name>`."],"exampleFix":"# before\nvagrant plugin uninstall aws            # wrong: installed name is vagrant-aws\n# after\nvagrant plugin list                      # confirm exact name\nvagrant plugin uninstall vagrant-aws","handlingStrategy":"validation","validationCode":"installed = `vagrant plugin list`.lines.map { |l| l.split.first }\nabort \"#{ARGV[0]} is not installed; installed: #{installed.join(', ')}\" unless installed.include?(ARGV[0])\nsystem('vagrant', 'plugin', 'uninstall', ARGV[0])","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Environment.new.cli(['plugin', 'uninstall', name])\nrescue Vagrant::Errors::PluginNotInstalled => e\n  warn e.extra_data[:name]\n  # recover: refresh the list, or fall through to a no-op\n  exit 0\nend","preventionTips":["Derive plugin names from `vagrant plugin list`, never from memory.","Match scope: use --local exactly when the plugin was installed with --local.","After a failed expunge, re-check plugins.json before uninstalling."],"tags":["vagrant","plugin","gem","not-installed"],"backgroundTag":"package-not-installed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}