{
  "schema_version": 2,
  "id": "commands/himport-discard",
  "title": "HIMPORT DISCARD",
  "url": "https://redis.io/docs/latest/commands/himport-discard/",
  "summary": "Removes a single session-local fieldset by name.",
  "since": "8.10.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:47:41+01:00",
  "page_type": "content",
  "content_hash": "c114ad37c74084e6aba3a4023235295d2009a2b142e3fd253ae75a2a1e45bdef",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Removes a single session-local fieldset, previously defined with [`HIMPORT PREPARE`](https://redis.io/docs/latest/commands/himport-prepare), from the current connection."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>fieldset-name</code></summary>\n\nThe name of the fieldset to remove from the current connection.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> HIMPORT PREPARE u name email age\nOK\nredis> HIMPORT DISCARD u\n(integer) 1\nredis> HIMPORT DISCARD u\n(integer) 0"
    },
    {
      "id": "details",
      "title": "Details",
      "role": "content",
      "text": "Discarding a fieldset only removes the fieldset itself; it does not affect any hashes already created from it with [`HIMPORT SET`](https://redis.io/docs/latest/commands/himport-set).\n\nUse `HIMPORT DISCARD` to free up resources on the connection once a bulk-ingestion job that used a given fieldset has finished. If you don't discard it, the fieldset stays allocated on the connection until the connection closes or the client issues the [`RESET`](https://redis.io/docs/latest/commands/reset) command."
    },
    {
      "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): `1` if the fieldset was removed, or `0` if no fieldset with that name existed on the connection.\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): `1` if the fieldset was removed, or `0` if no fieldset with that name existed on the connection."
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "[`HIMPORT PREPARE`](https://redis.io/docs/latest/commands/himport-prepare) | [`HIMPORT DISCARDALL`](https://redis.io/docs/latest/commands/himport-discardall)"
    }
  ],
  "examples": []
}
