{
  "schema_version": 2,
  "id": "commands/function-delete",
  "title": "FUNCTION DELETE",
  "url": "https://redis.io/docs/latest/commands/function-delete/",
  "summary": "Deletes a library and its functions.",
  "since": "7.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:32+01:00",
  "page_type": "content",
  "content_hash": "cf2b017f29f66310c978924ef17ef3a82101a5812cd9a839aac279c6c1733db3",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Delete a library and all its functions.\n\nThis command deletes the library called `library-name` and all functions in it.\nIf the library doesn't exist, the server returns an error.\n\nFor more information please refer to [Introduction to Redis Functions](https://redis.io/docs/latest/develop/programmability/functions-intro)."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>library-name</code></summary>\n\nThe name of the library to delete.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "[code example]"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`."
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "redis> FUNCTION LOAD \"#!lua name=mylib \\n redis.register_function('myfunc', function(keys, args) return 'hello' end)\"\n\"mylib\"\nredis> FCALL myfunc 0\n\"hello\"\nredis> FUNCTION DELETE mylib\nOK\nredis> FCALL myfunc 0\n(error) ERR Function not found",
      "section_id": "examples"
    }
  ]
}
