hashicorp/nomad · info
WARNING! The "nomad %s" command is deprecated. Please use "n
Error message
WARNING! The "nomad %s" command is deprecated. Please use "nomad %s" instead. This command will be removed a later version of Nomad.
What it means
DeprecatedCommand.Help wraps an embedded CLI command and calls warn() before returning the parent help text. The warning tells the user the invoked 'nomad <old>' command is deprecated and renamed to 'nomad <new>', and will be removed in a later version. It is informational output via Ui.Warn, not a failure.
Source
Thrown at command/commands.go:42
// EnvNomadCLIShowHints is an env var that toggles CLI hints.
EnvNomadCLIShowHints = `NOMAD_CLI_SHOW_HINTS`
)
// DeprecatedCommand is a command that wraps an existing command and prints a
// deprecation notice and points the user to the new command. Deprecated
// commands are always hidden from help output.
type DeprecatedCommand struct {
cli.Command
Meta
// Old is the old command name, New is the new command name.
Old, New string
}
// Help wraps the embedded Help command and prints a warning about deprecations.
func (c *DeprecatedCommand) Help() string {
c.warn()
return c.Command.Help()
}
// Run wraps the embedded Run command and prints a warning about deprecation.
func (c *DeprecatedCommand) Run(args []string) int {
c.warn()
return c.Command.Run(args)
}
func (c *DeprecatedCommand) warn() {
c.Ui.Warn(wrapAtLength(fmt.Sprintf(
"WARNING! The \"nomad %s\" command is deprecated. Please use \"nomad %s\" "+
"instead. This command will be removed a later version of Nomad.",
c.Old,
c.New)))
c.Ui.Warn("")
}
View on GitHub (pinned to 482b49bf1a)
Solutions
- Switch scripts and documentation to the new command name shown in the warning (the %s for New)
- Check 'nomad <new> -help' to confirm equivalent flags before migrating
- Silence by migrating; there is no supported way to suppress the deprecation warning
Example fix
// before nomad old-subcommand -help // after nomad new-subcommand -help
Defensive patterns
Strategy: fallback
Prevention
- Scan 'nomad help' output for deprecation notices after upgrades
- Alias old command names in shell profiles during migration windows
- Track Nomad release notes for command renames
When it happens
Trigger: Running 'nomad help <old-command>' (or any path that resolves help for a command wrapped in DeprecatedCommand) for a registered deprecation pair.
Common situations: Users following old documentation/scripts that still call renamed commands like 'nomad acl policy delete' style legacy names, or automation pinned to old command names after a Nomad upgrade.
Related errors
- resp.Warning
- not a terminal
- both -n and -c set
- Allocation %q is running the following tasks: * %s Please
- Region not found
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/640223a40f34ef00.
Report an issue: GitHub.