hashicorp/vagrant · warning
cloud_command.box.delete_warn
Error message
cloud_command.box.delete_warn
What it means
Destructive-action warning from `vagrant cloud box delete` (plugins/commands/cloud/box/delete.rb). After validating exactly one argument, if --force was not passed it warns 'This will completely remove <box> from Vagrant Cloud. This cannot be undone.', prompts 'Do you wish to continue? [y/N]', and returns exit status 1 unless the answer (stripped, downcased) is exactly 'y'.
Source
Thrown at plugins/commands/cloud/box/delete.rb:38
o.separator ""
o.separator "Options:"
o.separator ""
o.on("-f", "--[no-]force", "Do not prompt for deletion confirmation") do |f|
options[:force] = f
end
end
# Parse the options
argv = parse_options(opts)
return if !argv
if argv.empty? || argv.length > 1
raise Vagrant::Errors::CLIInvalidUsage,
help: opts.help.chomp
end
if !options[:force]
@env.ui.warn(I18n.t("cloud_command.box.delete_warn", box: argv.first))
cont = @env.ui.ask(I18n.t("cloud_command.continue"))
return 1 if cont.strip.downcase != "y"
end
@client = client_login(@env)
org, box_name = argv.first.split('/', 2)
delete_box(org, box_name, @client.token)
end
# Delete the requested box
#
# @param [String] org Organization name of box
# @param [String] box_name Name of box
# @param [String] access_token User access token
# @return [Integer]
def delete_box(org, box_name, access_token)
account = VagrantCloud::Account.new(View on GitHub (pinned to 35f3160f4a)
Solutions
- Double-check the target: confirm org/box with `vagrant cloud box show org/box` before deleting.
- For scripted deletion, pass --force and ensure the name is computed, not typed: `vagrant cloud box delete --force "$ORG/$BOX"`.
- If the prompt aborted you, that is by design (exit 1); re-run and answer 'y' (lowercase after downcase, any case works).
- Consider deleting only a version/provider (`vagrant cloud version delete` / `vagrant cloud provider delete`) instead of the whole box when possible.
Example fix
# before vagrant cloud box delete myorg/old-box # interactive [y/N] prompt, aborts on anything but y # after (explicit, non-interactive) vagrant cloud box show myorg/old-box && \ vagrant cloud box delete myorg/old-box --force
Defensive patterns
Strategy: validation
Validate before calling
# confirm the box exists before offering deletion
vagrant cloud box show "$ORG/$BOX" >/dev/null || { echo "no such box" >&2; exit 1; }
[ -n "$BOX" ] || { echo "refusing: empty box name" >&2; exit 1; } Prevention
- Prefer --force only with programmatically derived names, never free-typed input.
- Delete narrowest-first (provider, then version, then box).
- Treat the [y/N] default N as a safety net: answer explicitly only after re-reading the warned path.
When it happens
Trigger: Running `vagrant cloud box delete org/box` without -f/--force; the command contacts Vagrant Cloud only after a 'y' confirmation, deleting the entire box entry (all versions, all providers).
Common situations: Cleaning up test boxes published under an org; accidental targeting of a shared org box because the wrong org/box path was typed; automation where the interactive prompt blocks or the default 'N' aborts with exit 1.
Related errors
- This will completely remove provider %{provider} with archit
- This command was not invoked properly. The help for this com
- This command was not invoked properly. The help for this com
- This command was not invoked properly. The help for this com
- This command was not invoked properly. The help for this com
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/2ef17381bb9dba1f.
Report an issue: GitHub.