FUNCTION-DELETE(3valkey)
π FUNCTION-DELETE(3valkey) π
okay bestie, welcome to the Valkey Command Manual β this one's a little brutal but honestly iconic for it. it's function-delete, and yes it does exactly what it says on the tin π«Ά
β¨ NAME β¨
function-delete β Deletes a library and its functions.
πΈ SYNOPSIS πΈ
FUNCTION DELETE library-name
π¦ DESCRIPTION π¦
So. You know how a library is like, a whole squad of functions living together? Yeah. This command deletes the library called library-name and every single function inside it. no survivors. no takebacks. it's giving spring cleaning but with zero mercy π
If the library doesn't exist, the server hits you with an error. so like, don't try to delete a ghost library, it will simply not work.
For more information please refer to valkey-functions-intro(7) β Introduction to Valkey Functions. go read it, it's lowkey required reading for the function girlies.
π REPLY π
valkey-protocol(7) Simple string reply: OK.
β‘ COMPLEXITY β‘
constant time, babes. it's fast, it's efficient, it's the main character of complexity classes β¨
π ACL CATEGORIES π
@scripting@slow@write
π HISTORY π
- Available since: 7.0.0
π EXAMPLES π
watch and learn, bestie:
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 that last bit? π you deleted mylib, so myfunc is gone gone. the FCALL comes back with (error) ERR Function not found and honestly? that's just consequences. periodt.
π 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)
and that's the whole page, bestie π§π this cutie is from Valkey 9.0.0, dated 2025-10-21. go forth, delete responsibly, and don't come crying to me when your functions are gone π β¨
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms