How to empty a redis database?

Solution 1:

You have two options:

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

Solution 2:

Be careful here.

FlushDB deletes all keys in the current database while FlushALL deletes all keys in all databases on the current host.