# Unset

Remove an environment variable.

### Syntax

```
$ vela env unset <key> -t <target>
```

```
$ vela env unset STRIPE_SECRET_KEY -t production
$ vela env unset WHATSAPP_MODE -t preview
```

The key is removed whether it was secret or public — you should not have to remember which. Removing one that isn't set reports that there was nothing to remove rather than failing. As with [set](/docs/env/set), the instances the layer reaches are restarted so the change takes effect, and the environment is asked for when `-t` is missing.