FLUSHALL
FLUSHALL [ASYNC | SYNC]
- Group
- Server
- Complexity
- O(N) where N is the total number of keys
- Arity
- -1 (at least 1 words, counting the command name)
- Flags
- write
- 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
Section titled “Options”| Option | Effect |
|---|---|
ASYNC |
Accepted. The data is deleted before the reply, as with SYNC. |
SYNC |
Delete the data before replying. |
Return value
Section titled “Return value”| Case | Reply (RESP2 and RESP3) |
|---|---|
| Flushed | Simple string OK |
| Any other argument | Error ERR syntax error |
Examples
Section titled “Examples”127.0.0.1:6379> FLUSHALLOK127.0.0.1:6379> INFO keyspace# KeyspaceIn HotKV Cloud, the CLI tab of the panel does not run FLUSHALL. Send it
from your own client connection.
Compatibility
Section titled “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
Section titled “See also”Was this page helpful?
Thanks for the feedback.