# DEL

> Delete one or more keys of any type.

URL: https://docs.hotkv.com/commands/del/

```
DEL key [key ...]
```

- Group: Keys
- Complexity: O(N) for N keys, plus the size of each value removed
- HotKV Cloud: all plans
- On-Premise: no license needed

`DEL` removes the given keys, whatever type of value they hold. Keys that do
not exist are ignored. When you pass several keys they are removed together:
no other client sees some of them deleted and others still present.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Always | Integer: the number of keys that existed and were removed | Integer |

## Examples

```
127.0.0.1:6379> MSET a 1 b 2
OK
127.0.0.1:6379> DEL a b missing
(integer) 2
127.0.0.1:6379> EXISTS a
(integer) 0
```

## Compatibility

Same behaviour and reply as Redis 7 and Valkey 8.

## See also

[UNLINK](https://docs.hotkv.com/commands/unlink/index.md), [EXISTS](https://docs.hotkv.com/commands/exists/index.md),
[GETDEL](https://docs.hotkv.com/commands/getdel/index.md), [EXPIRE](https://docs.hotkv.com/commands/expire/index.md)