{
  "id": "himport-discardall",
  "title": "HIMPORT DISCARDALL",
  "url": "https://redis.io/docs/latest/commands/himport-discardall/",
  "summary": "Removes all session-local fieldsets for the connection.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-07-30T08:54:30-07:00",
  "page_type": "content",
  "content_hash": "b50ac328da662691d27e607651c6a369003c92c7ddd105cc11fefb4af4d5189e",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Removes every fieldset held by the current connection, discarding all definitions previously created with [`HIMPORT PREPARE`](https://redis.io/docs/latest/commands/himport-prepare)."
    },
    {
      "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=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): the number of fieldsets removed.\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): the number of fieldsets removed."
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "[`HIMPORT PREPARE`](https://redis.io/docs/latest/commands/himport-prepare/) | [`HIMPORT DISCARD`](https://redis.io/docs/latest/commands/himport-discard/)"
    }
  ],
  "examples": [
    {
      "id": "examples-ex0",
      "language": "plaintext",
      "code": "> HIMPORT PREPARE u name email age\nOK\n> HIMPORT PREPARE o id total\nOK\n> HIMPORT DISCARDALL\n(integer) 2",
      "section_id": "examples"
    }
  ]
}
