Out Plane
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

ArgumentTypeDescription
KEYstringThe variable's name, repeatable. Required. Takes the rest of the line.

Flags

FlagTypeDescription
--appstringApplication name or id. Defaults to the linked app. A flag rather than an argument, so that variable names cannot be mistaken for it.
--deployboolDeploy afterwards, so the removal reaches the running app.

The global flags apply as well.

Output

FieldTypeDescription
actionstringOne of set, unset.
keysarrayThe names that were removed.
appstring
changedboolFalse for a dry run.
deploymentIdint | null

Examples

Remove one variable

outplane env unset LOG_LEVEL

Remove several and apply the change

outplane env unset LOG_LEVEL TIMEOUT --app checkout --deploy

Check 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,changed

What 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:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe 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.

On this page