There are times where you want to delete all database data.

Warning -
The flush command deletes ALL of the data in the database. This includes all data in memory and persisted to disk. We recommend that you backup your database first.

flushall for Redis Enterprise Cloud Databases

You can flush a database from the command line with the redis-cli command or with your favorite Redis client.

Here is how to do it using redis-cli:

$ redis-cli -h <hostname> -p <portnumber> -a <password> flushall

Example:

$ redis-cli -h redis-12345.c24.us-east-mz-1.ec2.cloud.redislabs.com -p 12345 -a xyz flushall