# UNLINK

> Delete one or more keys, with the same result as DEL.

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

```
UNLINK key [key ...]
```

- Group: Keys
- Complexity: O(N) for N keys
- HotKV Cloud: all plans
- On-Premise: no license needed

`UNLINK` removes the given keys and returns how many of them existed. It
gives the same result and the same keyspace events as [DEL](https://docs.hotkv.com/commands/del/index.md),
so clients written for Redis that prefer `UNLINK` for large values work
unchanged. Missing keys are ignored, and several keys are removed together.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Always | Integer: the number of keys removed | Integer |

## Examples

```
127.0.0.1:6379> SET cache:page "<html>...</html>"
OK
127.0.0.1:6379> UNLINK cache:page cache:other
(integer) 1
```

## Compatibility

Same reply as Redis 7 and Valkey 8.

## See also

[DEL](https://docs.hotkv.com/commands/del/index.md), [EXISTS](https://docs.hotkv.com/commands/exists/index.md)