# CLUSTER DELSLOTSRANGE

> Unassign one or more ranges of hash slots in the receiving node's view of the cluster.

URL: https://docs.hotkv.com/commands/cluster-delslotsrange/

```
CLUSTER DELSLOTSRANGE start-slot end-slot [start-slot end-slot ...]
```

- Group: Cluster
- Complexity: O(N) where N is the total number of slots in the ranges
- HotKV Cloud: not available
- On-Premise: no license needed

`CLUSTER DELSLOTSRANGE` works like
[CLUSTER DELSLOTS](https://docs.hotkv.com/commands/cluster-delslots/index.md), but takes inclusive ranges
of slots. As with `DELSLOTS`, only the receiving node's view changes.

The ranges are checked in order, and nothing is removed unless every slot
of every range has an owner and no slot appears twice.

## Return value

Simple string `OK` in RESP2 and RESP3, or one of these errors:

| Case | Error |
| --- | --- |
| A slot is not an integer from 0 to 16383 | `ERR Invalid or out of range slot` |
| A range starts after it ends | `ERR start slot number <start> is greater than end slot number <end>` |
| A slot has no owner | `ERR Slot <slot> is already unassigned` |
| Ranges overlap | `ERR Slot <slot> specified multiple times` |
| An odd number of slot arguments | `ERR wrong number of arguments for 'cluster\|delslotsrange' command` |
| Cluster mode is off | `ERR This instance has cluster support disabled` |

## Examples

```
127.0.0.1:6379> CLUSTER DELSLOTSRANGE 0 99 200 299
OK
127.0.0.1:6379> CLUSTER DELSLOTSRANGE 0 10
(error) ERR Slot 0 is already unassigned
```

## Compatibility

Same checks, replies and error strings as Redis 7 and Valkey 8.

## See also

[CLUSTER DELSLOTS](https://docs.hotkv.com/commands/cluster-delslots/index.md),
[CLUSTER ADDSLOTSRANGE](https://docs.hotkv.com/commands/cluster-addslotsrange/index.md)

In a cluster: [Scaling a cluster](https://docs.hotkv.com/clustering/scaling/index.md#resharding-by-hand)