# basemodo env unset

Remove Secrets by name (all or none). The App loses them the next time it starts: basemodo restart.

```sh
basemodo env unset [OPTIONS] <NAME>...
```

## Arguments

- `NAME...` (required): The names of the Secrets to remove.
- `--app <APP>`: The App whose Secrets to change. Default: the one named after the current folder.

Like every command, it also takes the [global options](https://basemodo.com/docs/cli#global-options) `--json` and `--api-url`.

## Examples

Remove a Secret:

```sh
basemodo env unset MAILER_TOKEN
```

## Output

With `--json`, it prints {"secrets": [{"name", "updated_by", "updated_at"}], "changes": [{"name", "action", "by", "at"}], "warnings": [...]}, never a value. A warning names a Secret set before its name was refused, to rename.

## From an agent

Basemodo's [MCP](https://basemodo.com/docs/mcp) serves it as the tool [`env_unset`](https://basemodo.com/docs/mcp/tools/env_unset). It changes things, so an agent's client may ask you before it runs. Its arguments are the command's, named as JSON keys: `names` (list of text), `app` (text). It answers what the command prints with `--json`.

## Explained in

- [Secrets](https://basemodo.com/docs/secrets)
- [Expose an API to another Owner's App](https://basemodo.com/docs/expose-an-api)