How to delete everything in Redis

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?

Best Answer

With redis-cli:

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

For example, in your shell:

redis-cli flushall