# kv.entry.delete

Delete the entry --key from the project's key-value store (--durable for the disk-backed one)

# kv.entry.delete

```
kv.entry.delete --key TEXT [--durable] → entry
```

Delete the entry `--key` from the project's key-value store (`--durable` for the disk-backed one). Adds `entry: { key, deleted }` and keeps the rest of the payload; a key that is not there answers `deleted: false`. Use it to consume a one-time value — an OAuth state, a reset token — right after [`kv.entry.get`](/nodes/kv/kv.entry.get.md) read it, so it cannot be used twice.

## Flags

- `--key` (required): The entry to delete. Usually a {{ }} expression.
- `--durable`: Use the disk-backed store, which survives a restart. Default: the in-memory one.

## Examples

### Consume a one-time state

```
| kv.entry.delete --key "oauth:state:{{ $trigger.query.state }}"
```

It answers:

```json
{
  "entry": {
    "key": "oauth:state:3f9c",
    "deleted": true
  }
}
```

## Used in

- [Sign in with Google (OAuth login)](/examples/oauth-login-google.md)
