# ARDELRANGE

```json metadata
{
  "schema_version": 2,
  "title": "ARDELRANGE",
  "description": "Deletes elements in one or more ranges.",
  "categories": ["docs","develop","stack","oss","rs","rc","oss","kubernetes","clients"],
  "arguments": [{"key_spec_index":0,"name":"key","type":"key"},{"arguments":[{"name":"start","type":"integer"},{"name":"end","type":"integer"}],"multiple":true,"name":"range","type":"block"}],
  "syntax_fmt": "ARDELRANGE key start end [start end ...]",
  "complexity": "Proportional to the number of existing elements / slices touched, not to the numeric span of the requested ranges",
  "group": "array",
  "command_flags": ["WRITE"],
  "acl_categories": ["@write","@array","@slow"],
  "since": "8.8.0",
  "arity": -4,
  "key_specs": [{"begin_search":{"index":{"pos":1}},"find_keys":{"range":{"lastkey":0,"limit":0,"step":1}},"flags":["RW","DELETE"]}],
  "tableOfContents": {"sections":[{"id":"required-arguments","title":"Required arguments"},{"id":"examples","title":"Examples"},{"id":"redis-software-and-redis-cloud-compatibility","title":"Redis Software and Redis Cloud compatibility"},{"id":"return-information","title":"Return information"}]}

,
  "codeExamples": []
}
```

Deletes elements in one or more ranges.

## Required arguments

<details open><summary><code>key</code></summary>

The name of the key that holds the array.

</details>

<details open><summary><code>range</code></summary>

One or more `start end` pairs, each defining an inclusive range of indices to delete. If `start` is greater than `end` for a given pair, the range is processed in ascending order regardless. Multiple pairs may overlap; each element is counted at most once.

</details>

## Examples


redis> ARMSET myarray 0 "a" 1 "b" 2 "c" 3 "d" 4 "e"
(integer) 5
redis> ARDELRANGE myarray 1 3
(integer) 3
redis> ARCOUNT myarray
(integer) 2
redis> ARGET myarray 0
"a"
redis> ARGET myarray 4
"e"


## Redis Software and Redis Cloud compatibility

| Redis<br />Software | Redis<br />Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> |
|:----------------------|:-----------------|:------|
| <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> |  |

## Return information

**RESP2:**

[Integer reply](../../develop/reference/protocol-spec#integers): Number of elements deleted.

**RESP3:**

[Integer reply](../../develop/reference/protocol-spec#integers): Number of elements deleted.



