# FLUSHALL

> Delete every key in every database, along with the data of HotKV's AI features.

URL: https://docs.hotkv.com/commands/flushall/

```
FLUSHALL [ASYNC | SYNC]
```

- Group: Server
- Complexity: O(N) where N is the total number of keys
- HotKV Cloud: all plans
- On-Premise: no license needed

`FLUSHALL` deletes every key in every database and all tags. It also deletes
the entries held by HotKV's AI features, such as prompt and semantic cache
entries, so the server is left empty. Configuration-like data shared by the
cluster, such as model prices and tenants, is kept. Like any write, it
is sent to replicas and written to the append-only file. There is no undo.

## Options

| Option | Effect |
| --- | --- |
| `ASYNC` | Accepted. The data is deleted before the reply, as with `SYNC`. |
| `SYNC` | Delete the data before replying. |

## Return value

| Case | Reply (RESP2 and RESP3) |
| --- | --- |
| Flushed | Simple string `OK` |
| Any other argument | Error `ERR syntax error` |

## Examples

```
127.0.0.1:6379> FLUSHALL
OK
127.0.0.1:6379> INFO keyspace
# Keyspace
```

In HotKV Cloud, the CLI tab of the panel does not run `FLUSHALL`. Send it
from your own client connection.

## Compatibility

Same as Redis 7 and Valkey 8, except that `ASYNC` does not defer freeing
memory to the background. Clearing the AI feature data matches what
`FLUSHALL` does to module data in Redis.

## See also

[FLUSHDB](https://docs.hotkv.com/commands/flushdb/index.md), [SWAPDB](https://docs.hotkv.com/commands/swapdb/index.md), [INFO](https://docs.hotkv.com/commands/info/index.md)