{"record":{"id":"f61b0258fcb1ce8a","repo":"hashicorp/vagrant","slug":"this-will-completely-remove-version-version-fro","errorCode":null,"errorMessage":"This will completely remove version %{version} from %{box} from Vagrant Cloud. This cannot be undone.","messagePattern":"This will completely remove version %(.+?) from %(.+?) from Vagrant Cloud\\. This cannot be undone\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugins/commands/cloud/version/delete.rb","lineNumber":40,"sourceCode":"              o.separator \"\"\n              o.on(\"-f\", \"--[no-]force\", \"Force deletion without confirmation\") do |f|\n                options[:force] = f\n              end\n            end\n\n            # Parse the options\n            argv = parse_options(opts)\n            return if !argv\n            if argv.size != 2\n              raise Vagrant::Errors::CLIInvalidUsage,\n                help: opts.help.chomp\n            end\n\n            org, box_name = argv.first.split('/', 2)\n            version = argv[1]\n\n            if !options[:force]\n              @env.ui.warn(I18n.t(\"cloud_command.version.delete_warn\", version: version, box: argv.first))\n              cont = @env.ui.ask(I18n.t(\"cloud_command.continue\"))\n              return 1 if cont.strip.downcase != \"y\"\n            end\n\n            @client = client_login(@env)\n\n            delete_version(org, box_name, version, @client.token, options.slice)\n          end\n\n          # Delete the requested box version\n          #\n          # @param [String] org Box organization name\n          # @param [String] box_name Name of the box\n          # @param [String] box_version Version of the box\n          # @param [String] access_token User Vagrant Cloud access token\n          # @param [Hash] options Current unsued\n          def delete_version(org, box_name, box_version, access_token, options={})\n            account = VagrantCloud::Account.new(","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/cloud/version/delete.rb#L22-L58","documentation":"Safety warning printed by `vagrant cloud version delete` before it permanently removes a box version from Vagrant Cloud. It is shown only when --force is absent; Vagrant then asks the shared continue question and returns exit code 1 unless the answer strips and downcases to exactly \"y\", in which case delete_version runs and the removal cannot be undone.","triggerScenarios":"`vagrant cloud version delete org/box 1.2.3` without --force, after the argv check passes (exactly two arguments: \"org/box\" and the version string). Any answer other than y aborts with exit code 1 and the version is kept.","commonSituations":"Cleaning up mis-pushed versions; scripted cleanup that unexpectedly blocks on the interactive prompt; operators double-checking because the deletion is irreversible.","solutions":["Answer `y` at the prompt to proceed with the deletion","Use `vagrant cloud version delete org/box 1.2.3 --force` in scripts or CI to skip the prompt","Answer anything other than `y` (or ctrl-c) to abort; exit code 1 signals nothing was deleted","Verify arguments first: exactly two (`org/box` and version), otherwise Vagrant::Errors::CLIInvalidUsage is raised with the help text"],"exampleFix":"# before\nvagrant cloud version delete acme/app 1.0.0   # interactive prompt\n# after (automation)\nvagrant cloud version delete acme/app 1.0.0 --force","handlingStrategy":"validation","validationCode":"# Preflight: exactly two args, box has a slash, version looks like a version\nset -- \"org/box\" \"1.2.3\"\n[ $# -eq 2 ] && [[ $1 == */* ]] && [[ $2 =~ ^[0-9]+(\\.[0-9]+)*$ ]] || { echo \"bad args\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use --force only in non-interactive scripts, never interactively","Keep a convention of confirming org/box and version with `vagrant cloud box info` before deleting","Remember the shared rule: answers must strip/downcase to exactly y"],"tags":["vagrant","cloud","version","delete","confirmation"],"backgroundTag":"destructive-operation-confirmation","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}