function-delete.3valkey - Man Page

Deletes a library and its functions.

Synopsis

FUNCTION DELETE library-name

Description

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 valkey-functions-intro(7) Introduction to Valkey Functions.

Reply

valkey-protocol(7) Simple string reply: OK.

Complexity

O(1)

Acl Categories

@scripting @slow @write

History

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 Also

eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-restore(3valkey), function-stats(3valkey), script(3valkey), script-debug(3valkey), script-exists(3valkey), script-flush(3valkey), script-help(3valkey), script-kill(3valkey), script-load(3valkey), script-show(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual