# CLUSTER DELSLOTS

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

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

```
CLUSTER DELSLOTS slot [slot ...]
```

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

`CLUSTER DELSLOTS` makes the receiving node forget who owns the given hash
slots, whichever node that is. Only this node's view changes: the other
nodes are not told, and a slot that another node still claims comes back
when that node's next message arrives. It is mostly useful for repairing a
cluster by hand.

Every slot is checked before any is removed, so the command removes all
the slots or none of them. Removing a slot also ends any import of it this
node had open.

## 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 slot has no owner | `ERR Slot <slot> is already unassigned` |
| The same slot is given twice | `ERR Slot <slot> specified multiple times` |
| Cluster mode is off | `ERR This instance has cluster support disabled` |

## Examples

```
127.0.0.1:6379> CLUSTER DELSLOTS 10 11
OK
127.0.0.1:6379> CLUSTER DELSLOTS 10
(error) ERR Slot 10 is already unassigned
```

## Compatibility

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

## See also

[CLUSTER DELSLOTSRANGE](https://docs.hotkv.com/commands/cluster-delslotsrange/index.md),
[CLUSTER ADDSLOTS](https://docs.hotkv.com/commands/cluster-addslots/index.md),
[CLUSTER FLUSHSLOTS](https://docs.hotkv.com/commands/cluster-flushslots/index.md)

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