Easy Tutorial
❮ Sets Sinterstore Keys Move ❯

Redis DEL Command

Redis Keys

The Redis DEL command is used to delete existing keys. Keys that do not exist are ignored.

Syntax

The basic syntax for the redis DEL command is as follows:

redis 127.0.0.1:6379> DEL KEY_NAME

Available Versions

= 1.0.0

Return Value

The number of keys that were deleted.

Example

First, we create a key and set a value in redis.

redis 127.0.0.1:6379> SET w3ckey redis
OK

Now we delete the created key.

redis 127.0.0.1:6379> DEL w3ckey
(integer) 1

Redis Keys

❮ Sets Sinterstore Keys Move ❯