How do I delete everything in Redis?

TIMEX picture TIMEX · Jul 28, 2011 · Viewed 431.2k times · Source

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?

Answer

Javier picture Javier · Jul 28, 2011

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