CLI reference/Environments/env
clavis env rm
Delete an environment and the secrets in it
sh
clavis env rm SLUG [flags]Also available as delete.
Delete an environment together with its secrets, their history and personal overrides. It cannot be undone, and a project must keep at least one environment. You type the environment's slug to confirm; without a terminal, pass --yes.
Examples
sh
clavis env rm qaIn a script
sh
clavis env rm qa --yesFlags
--yes- skip the confirmation (required without a terminal)
Details
Needs permission to manage environments. The deletion is recorded in the audit log. delete is an alias.
Global flags
These work with every command.
--debug- enable debug logging
--env string- environment slug
--json- output machine-readable JSON
--org string- organization slug
--overlay string- tenant/region overlay slug
--path string- folder path (default /)
--project string- project slug
--server string- Clavis server URL (default: from .clavis.yaml or saved login)
-h, --help- help for any command