- Usage:
FUNCTION DELETE library-name
- Complexity:
- O(1)
- Since:
- 7.0.0
Delete a library and all its functions.
This command deletes the library called library-name and all functions in it. If the library doesn’t exist, the server returns an error.
For more information please refer to Introduction to Valkey Functions.
Examples
valkey> FUNCTION LOAD "#!lua name=mylib \n redis.register_function('myfunc', function(keys, args) return 'hello' end)"
"mylib"
valkey> FCALL myfunc 0
"hello"
valkey> FUNCTION DELETE mylib
OK
valkey> FCALL myfunc 0
(error) ERR Function not found