How to empty a redis database?

Luc picture Luc · Apr 22, 2011 · Viewed 101.5k times · Source

I've been playing with redis (and add some fun with it) during the last fews days and I'd like to know if there is a way to empty the db (remove the sets, the existing key....) easily.
During my tests, I created several sets with a lot of members, even created sets that I do not remember the name (how can I list those guys though ?).
Any idea about how to get rid of all of them ?

Answer

plaes picture plaes · Apr 22, 2011

You have two options:

  • FLUSHDB - clears currently active database
  • FLUSHALL - clears all the existing databases