« Back to Search  |  Reader Mode  |  Switch to Full Retro Site View Links: Stay in Reader  |  Retro Mode: ON  |  Original »
Valkey · Extracted in 411 ms

Valkey Command: FUNCTION DELETE

Source: https://valkey.io/commands/function-delete/

FUNCTION DELETE

Usage:
FUNCTION DELETE library-name
Complexity:
O(1)
Since:
7.0.0
ACL Categories:
@scripting, @slow, @write

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 .

Reply

OK.

Examples

127.0.0.1:6379> FUNCTION LOAD "#!lua name=mylib \n server.register_function('myfunc', function(keys, args) return 'hello' end)"
"mylib"
127.0.0.1:6379> FCALL myfunc 0
"hello"
127.0.0.1:6379> FUNCTION DELETE mylib
OK
127.0.0.1:6379> FCALL myfunc 0
(error) ERR Function not found
See an error? Update this Page on GitHub!