
{
  "id": "rpushx",
  "title": "RPUSHX",
  "url": "https://redis.io/docs/latest/commands/rpushx/",
  "summary": "Appends an element to a list only when the list exists.",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-05-27T13:11:51-07:00",
  "page_type": "content",
  "content_hash": "08daa325bfbdf562e4ff4fd788ff1ca6564dbd3c48b8e4d8a85ab6c66fb5d734",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Inserts specified values at the tail of the list stored at `key`, only if `key`\nalready exists and holds a list.\nIn contrary to [`RPUSH`](https://redis.io/docs/latest/commands/rpush), no operation will be performed when `key` does not yet\nexist."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "RPUSH mylist \"Hello\"\nRPUSHX mylist \"World\"\nRPUSHX myotherlist \"World\"\nLRANGE mylist 0 -1\nLRANGE myotherlist 0 -1"
    },
    {
      "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[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation.\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): the length of the list after the push operation."
    }
  ],
  "examples": []
}
