{"record":{"id":"06b81de6d6bd4a8e","repo":"hashicorp/vagrant","slug":"this-command-was-not-invoked-properly-the-help-fo-06b81d","errorCode":null,"errorMessage":"This command was not invoked properly. The help for this command is available below. %{help}","messagePattern":"This command was not invoked properly\\. The help for this command is available below\\. %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::CLIInvalidUsage","httpStatus":null,"severity":"error","filePath":"plugins/commands/plugin/command/uninstall.rb","lineNumber":25,"sourceCode":"\nmodule VagrantPlugins\n  module CommandPlugin\n    module Command\n      class Uninstall < Base\n        def execute\n          options = {}\n          opts = OptionParser.new do |o|\n            o.banner = \"Usage: vagrant plugin uninstall <name> [<name2> <name3> ...] [-h]\"\n\n            o.on(\"--local\", \"Remove plugin from local project\") do |l|\n              options[:env_local] = l\n            end\n          end\n\n          # Parse the options\n          argv = parse_options(opts)\n          return if !argv\n          raise Vagrant::Errors::CLIInvalidUsage, help: opts.help.chomp if argv.length < 1\n\n          # Uninstall the gems\n          argv.each do |gem|\n            action(Action.action_uninstall, plugin_name: gem, env_local: options[:env_local])\n          end\n\n          # Success, exit status 0\n          0\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":7,"sourceCodeEnd":39,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/plugin/command/uninstall.rb#L7-L39","documentation":"`vagrant plugin uninstall <name> [<name2> ...]` requires at least one positional argument; argv.length < 1 after parsing raises Vagrant::Errors::CLIInvalidUsage with the help text. Each remaining argv entry is uninstalled in sequence through the uninstall action.","triggerScenarios":"Bare `vagrant plugin uninstall`; an empty loop variable in a script so no names are passed; all tokens consumed as flags.","commonSituations":"Automation that uninstalls a computed list which turns out empty; shell quoting that drops the name.","solutions":["Pass one or more exact plugin names: `vagrant plugin uninstall vagrant-aws`.","Get the exact names from `vagrant plugin list` first.","Add --local when the plugin is installed in the project scope."],"exampleFix":"# before\nvagrant plugin uninstall\n# after\nvagrant plugin uninstall vagrant-aws vagrant-vbguest","handlingStrategy":"validation","validationCode":"names = ARGV.reject { |a| a.start_with?('-') }\nabort 'usage: vagrant plugin uninstall <name> [...]' if names.empty?\nsystem('vagrant', 'plugin', 'uninstall', *names)","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Environment.new.cli(['plugin', 'uninstall', name])\nrescue Vagrant::Errors::CLIInvalidUsage => e\n  warn e.message\n  exit 1\nend","preventionTips":["Skip the uninstall when the computed name list is empty rather than running the bare command.","Source names from `vagrant plugin list` output.","Match the installation scope with --local where applicable."],"tags":["vagrant","plugin","cli","usage"],"backgroundTag":"invalid-cli-usage","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}