English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The Redis Flushall command is used to clear the entire Redis server's data (deleting all keys in all databases).
Basic Syntax of Redis Flushall Command
redis 127.0.0.1:6379> FLUSHALL
>= 1.0.0
Always returns OK.
redis 127.0.0.1:6379> DBSIZE # The key count of 0th database (integer) 9 redis 127.0.0.1:6379> SELECT 1 # Switch to 1 th database OK redis 127.0.0.1:6379> DBSIZE # 1 th database's key count (integer) 6 redis 127.0.0.1:6379> flushall # Clear all databases' keys OK redis 127.0.0.1:6379> DBSIZE # Not only 1 th database was cleared (integer) 0 redis 127.0.0.1:6379> SELECT 0 # 0th database (and all other databases) as well OK redis 127.0.0.1:6379> DBSIZE (integer) 0