# FUNCTION DELETE

> Delete a function library and all of its functions.

URL: https://docs.hotkv.com/commands/function-delete/

```
FUNCTION DELETE library-name
```

- Group: Scripting and functions
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`FUNCTION DELETE` removes the named library and every function it registered.
The library name must match exactly, including case. The change is persisted
and replicated.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Deleted | Simple string `OK` | Simple string `OK` |
| No such library | Error `ERR Library not found` | Error |

## Examples

```
127.0.0.1:6379> FUNCTION DELETE util
OK
127.0.0.1:6379> FUNCTION DELETE util
(error) ERR Library not found
```

## Compatibility

Same as Redis 7 and Valkey 8.

## See also

[FUNCTION LOAD](https://docs.hotkv.com/commands/function-load/index.md), [FUNCTION FLUSH](https://docs.hotkv.com/commands/function-flush/index.md),
[FUNCTION LIST](https://docs.hotkv.com/commands/function-list/index.md)