{"record":{"id":"e965f60b610e6acd","repo":"hashicorp/vagrant","slug":"you-requested-to-remove-the-box-name-version-e965f6","errorCode":null,"errorMessage":"You requested to remove the box '%{name}' version '%{version}'\nwith provider '%{provider}'. The box '%{name}' exists but not\nwith the provider specified. Please double-check and try again.\n\nThe providers for this are: %{providers}","messagePattern":"You requested to remove the box '%(.+?)' version '%(.+?)'\nwith provider '%(.+?)'\\. The box '%(.+?)' exists but not\nwith the provider specified\\. Please double-check and try again\\.\n\nThe providers for this are: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::BoxRemoveProviderNotFound","httpStatus":null,"severity":"error","filePath":"lib/vagrant/action/builtin/box_remove.rb","lineNumber":77,"sourceCode":"\n            # Only a single version remains\n            box_version = box_info.keys.first\n\n            # Further filtering only matters if not removing all providers\n            if !box_remove_all_providers\n              # If no provider was given, check if there are more\n              # than a single provider for the version\n              if !box_provider && box_info.values.first.size > 1\n                raise Errors::BoxRemoveMultiProvider,\n                  name: box_name,\n                  version: box_version,\n                  providers: box_info.values.first.keys.map(&:to_s).sort.join(\", \")\n              end\n\n              # If a provider was given, check the version has it\n              if box_provider\n                if !box_info.values.first.key?(box_provider)\n                  raise Errors::BoxRemoveProviderNotFound,\n                    name: box_name,\n                    version: box_version,\n                    provider: box_provider.to_s,\n                    providers: box_info.values.first.keys.map(&:to_s).sort.join(\", \")\n                else\n                  box_info.values.first.delete_if { |k, _| k.to_s != box_provider.to_s }\n                end\n              end\n\n              # Only a single provider remains\n              box_provider = box_info.values.first.keys.first\n\n              # Further filtering only matters if not removing all architectures\n              if !box_remove_all_architectures\n                # If no architecture was given, check if there are more\n                # than a single architecture for the provider in version\n                if !box_architecture && box_info.values.first.values.first.size > 1\n                  raise Errors::BoxRemoveMultiArchitecture,","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/action/builtin/box_remove.rb#L59-L95","documentation":"Errors::BoxRemoveProviderNotFound is raised when an explicit --provider was given for removal but the resolved version of the box does not include that provider. The error lists the providers that ARE installed for that version.","triggerScenarios":"box_provider is truthy and !box_info.values.first.key?(box_provider) after version filtering; the raise carries name, version, the requested provider, and the installed providers joined with ', '.","commonSituations":"Misspelled provider name (vmware vs vmware_workstation); assuming a box was added for hyperv when only the virtualbox variant exists; stale cleanup scripts referencing a provider that was already removed.","solutions":["Copy the provider string from the error's 'providers for this are' list.","Run 'vagrant box list' to see the exact provider labels Vagrant uses.","Drop --provider and use --all-providers when the specific provider no longer matters."],"exampleFix":"# before\nvagrant box remove ubuntu/jammy64 --provider vmware   # label is vmware_workstation\n\n# after\nvagrant box remove ubuntu/jammy64 --provider vmware_workstation","handlingStrategy":"validation","validationCode":"providers = env.box_collection.all\n  .select { |n, v, *, | n == box_name && v == box_version }\n  .map { |*, p, | p }\nexit 0 unless providers.include?(requested_provider)","typeGuard":"def provider_installed?(collection, name, version, provider)\n  collection.all.any? { |n, v, p, *, | n == name && v == version && p.to_s == provider.to_s }\nend","tryCatchPattern":"begin\n  env.cli(\"box\", \"remove\", name, \"--provider\", prov)\nrescue Vagrant::Errors::BoxRemoveProviderNotFound => e\n  # e.extra_data[:providers] lists what is actually installed\n  warn \"try one of: #{e.extra_data[:providers]}\"\nend","preventionTips":["Use Vagrant's canonical provider labels (vmware_workstation, vmware_fusion, not vmware).","Query the collection at runtime for installed providers rather than assuming from install history."],"tags":["vagrant","box-remove","provider-not-installed"],"backgroundTag":"provider-not-installed","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}