How do I delete everything in Redis?

前端 未结 22 987
无人共我
无人共我 2020-11-28 17:18

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?

22条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 17:29

    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
    

提交回复
热议问题