How Do I Clear Redis Data?
Exercise caution when clearing data.
- Redis 4.0 or later
Access the instance in redis-cli or using Web CLI on the console and run command FLUSHDB or FLUSHALL. Or choose More > Clear Data on the DCS console to clear Redis data all at once.
Cluster instances do not support multi-DB by default. They consist of shards. To use commands FLUSHDB or FLUSHALL to clear data for these instances, run them on every shard. Otherwise, there may be data remanence.
- Running FLUSHDB command on Web CLI clears only one shard at a time. If there are multiple shards, use the CLI to access the master node of each shard and run the FLUSHDB command.
- Redis Cluster data cannot be cleared by using Web CLI.