Alex Rivera | Logout

How to empty a redis database?

Asked 2011-04-22T13:46:51.610
218

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 ?

Edit
Report

1 Answer

156

Be careful here.

FLUSHDB deletes all keys just in the current database (0 by default), while FLUSHALL deletes all keys in all databases (on the current host).

answered 2012-01-23T20:26:16.793

Your Answer