= 1.0.0 Return" />



English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Redis Flushdb Command

Redis Server

The Redis Flushdb command is used to clear all keys in the current database.

Syntax

The basic syntax of the redis Flushdb command is as follows:

redis 127.0.0.1:6379> FLUSHDB 

Available Version

>= 1.0.0

Return Value

Always returns OK .

Online Examples

redis 127.0.0.1:6379> DBSIZE    # Number of keys before clearing
(integer) 4
redis 127.0.0.1:6379> FLUSHDB
OK
redis 127.0.0.1:6379> DBSIZE    # Number of keys after clearing
(integer) 0

Redis Server