hashicorp/vagrant · warning · Vagrant::Errors::CommandDeprecated
The command 'vagrant %{name}' has been deprecated and is no
Error message
The command 'vagrant %{name}' has been deprecated and is no longer functional
within Vagrant. What it means
Raised by CLI command classes that include Vagrant::Util::CommandDeprecation::Complete: the module overrides #execute to immediately raise Errors::CommandDeprecated with deprecation_command_name. 'Complete' means the deprecation window has ended and the command's functionality is fully removed — it raises instead of running. The in-repo consumer is the legacy Atlas push (plugins/pushes/atlas/push.rb).
Source
Thrown at lib/vagrant/util/command_deprecation.rb:51
alias_method :non_deprecated_execute, :execute
def execute(*args, &block)
@env[:ui].warn(I18n.t("vagrant.commands.deprecated",
name: deprecation_command_name
) + "\n")
non_deprecated_execute(*args, &block)
end
end
end
# Mark command deprecation complete and fully disable
# the command's functionality
module Complete
def self.included(klass)
klass.include(CommandDeprecation)
klass.class_eval do
def execute(*_)
raise Vagrant::Errors::CommandDeprecated,
name: deprecation_command_name
end
end
end
end
end
end
end
View on GitHub (pinned to 35f3160f4a)
Solutions
- Replace the invocation with the supported successor workflow (for box publication: `vagrant cloud publish`; for deploys: your own deploy tooling)
- Audit scripts and docs for the retired command name and remove the calls
- As a last resort, pin the last Vagrant version where the command still functioned while you migrate
Example fix
# before (retired command) vagrant push # after (publish box artifacts to Vagrant Cloud instead) vagrant cloud publish myuser/mybox 1.0.0 virtualbox box.box --short-description "1.0.0" --release
Defensive patterns
Strategy: fallback
Validate before calling
# fail fast in scripts: only call commands that still exist
listed = `vagrant list-commands`.split
fail 'vagrant push was removed' unless listed.include?('push') Try / catch
begin
Vagrant.application.execute('push')
rescue Vagrant::Errors::CommandDeprecated => e
warn e.message
replacement_workflow # e.g. `vagrant cloud publish`
end Prevention
- Check release notes for removed commands before upgrading Vagrant
- Prefer long-lived stable commands in CI scripts
- Wrap retired invocations in a shim that maps old names to new workflows
When it happens
Trigger: Executing a retired command whose class mixes in CommandDeprecation::Complete — e.g. `vagrant push` with the legacy atlas strategy after Atlas-era push support was removed; also any third-party plugin command that includes the Complete module.
Common situations: Old scripts, CI pipelines, or docs still invoking commands that a Vagrant upgrade removed; muscle-muscle invocations after updating.
Related errors
- vagrant.commands.deprecated
- You requested to remove the box '%{name}' version '%{version
- The box you're attempting to add already exists. Remove it b
- An invalid option was specified. The help for this command i
- A Vagrant environment or target machine is required to run t
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/b80242d0ef313346.
Report an issue: GitHub.