hashicorp/vagrant · warning
This will completely remove version %{version} from %{box} f
Error message
This will completely remove version %{version} from %{box} from Vagrant Cloud. This cannot be undone. What it means
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.
Source
Thrown at plugins/commands/cloud/version/delete.rb:40
o.separator ""
o.on("-f", "--[no-]force", "Force deletion without confirmation") do |f|
options[:force] = f
end
end
# Parse the options
argv = parse_options(opts)
return if !argv
if argv.size != 2
raise Vagrant::Errors::CLIInvalidUsage,
help: opts.help.chomp
end
org, box_name = argv.first.split('/', 2)
version = argv[1]
if !options[:force]
@env.ui.warn(I18n.t("cloud_command.version.delete_warn", version: version, box: argv.first))
cont = @env.ui.ask(I18n.t("cloud_command.continue"))
return 1 if cont.strip.downcase != "y"
end
@client = client_login(@env)
delete_version(org, box_name, version, @client.token, options.slice)
end
# Delete the requested box version
#
# @param [String] org Box organization name
# @param [String] box_name Name of the box
# @param [String] box_version Version of the box
# @param [String] access_token User Vagrant Cloud access token
# @param [Hash] options Current unsued
def delete_version(org, box_name, box_version, access_token, options={})
account = VagrantCloud::Account.new(View on GitHub (pinned to 35f3160f4a)
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
Example fix
# before vagrant cloud version delete acme/app 1.0.0 # interactive prompt # after (automation) vagrant cloud version delete acme/app 1.0.0 --force
Defensive patterns
Strategy: validation
Validate before calling
# Preflight: exactly two args, box has a slash, version looks like a version
set -- "org/box" "1.2.3"
[ $# -eq 2 ] && [[ $1 == */* ]] && [[ $2 =~ ^[0-9]+(\.[0-9]+)*$ ]] || { echo "bad args"; exit 1; } Prevention
- 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
When it happens
Trigger: `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.
Common situations: Cleaning up mis-pushed versions; scripted cleanup that unexpectedly blocks on the interactive prompt; operators double-checking because the deletion is irreversible.
Related errors
- This will release version %{version} from %{box} to Vagrant
- This will revoke version %{version} from %{box} from Vagrant
- The format of box version provided (%{version}) is incorrect
- A version of the box you're loading is formatted in a way th
- The Vagrant app data directory (%{path}) is in a structure V
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/f61b0258fcb1ce8a.
Report an issue: GitHub.