env
env unset
Remove environment variables.
writes--dry-run
Removes variables by name.
All of them or none of them: a name that is not set stops the whole command, so a typo cannot half remove something. The value itself cannot be recovered afterwards.
Usage
outplane env unset <KEY...> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
KEY | string | The variable's name, repeatable. Required. Takes the rest of the line. |
Flags
| Flag | Type | Description |
|---|---|---|
--app | string | Application name or id. Defaults to the linked app. A flag rather than an argument, so that variable names cannot be mistaken for it. |
--deploy | bool | Deploy afterwards, so the removal reaches the running app. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
action | string | One of set, unset. |
keys | array | The names that were removed. |
app | string | |
changed | bool | False for a dry run. |
deploymentId | int | null |
Examples
Remove one variable
outplane env unset LOG_LEVELRemove several and apply the change
outplane env unset LOG_LEVEL TIMEOUT --app checkout --deployCheck the names resolve before removing anything
outplane env unset LOG_LEVEL --dry-run --json{
"changed": false,
"keys": [
"LOG_LEVEL"
]
}Remove several at once and read the result
outplane env unset LOG_LEVEL TIMEOUT --json --fields keys,changedWhat to Know
- A name that is not set is exit 5 and nothing is removed, including the names that were valid. Removal is all or nothing.
- The value cannot be recovered afterwards. This command is not gated behind a confirmation, because removing a variable is an ordinary edit; the irreversible part is the value, not the application.
- Without --deploy the running application still has the variable. Removing it from the record and from the process are two different things.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of env.not_found, context.no_app, app.not_found, usage.missing_argument. Branch on that, or on the exit status. The message is prose and changes.