Search code examples
redis

How do I delete everything in Redis?


I want to delete all keys. I want everything wiped out and give me a blank database.

Is there a way to do this in Redis client?


Solution

  • With redis-cli:

    • FLUSHDB – Deletes all keys from the connection's current database.
    • FLUSHALL – Deletes all keys from all databases on current host.

    For example, in your shell:

    redis-cli flushall