# VSIM.DROPINDEX

> Delete a vector index and all its vectors.

URL: https://docs.hotkv.com/commands/vsim-dropindex/

```
VSIM.DROPINDEX index
```

- Group: Vector search
- Complexity: O(N), N being the vectors in the index
- HotKV Cloud: all plans
- On-Premise: no license needed

`VSIM.DROPINDEX` deletes the vector index `index` together with every vector
stored in it. Keys in the keyspace and their tags are not affected.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| Index deleted | Simple string `OK` | Simple string `OK` |

Error replies: `ERR index 'name' not found`.

## Examples

```
127.0.0.1:6379> VSIM.CREATEINDEX scratch 4
OK
127.0.0.1:6379> VSIM.DROPINDEX scratch
OK
127.0.0.1:6379> VSIM.DROPINDEX scratch
(error) ERR index 'scratch' not found
```

## Compatibility

HotKV-only command.

## See also

[VSIM.CREATEINDEX](https://docs.hotkv.com/commands/vsim-createindex/index.md), [VSIM.INFO](https://docs.hotkv.com/commands/vsim-info/index.md)