---
question: How do I delete vectors or a whole collection?
kind: task
via_web: available
via_cli: na
via_python: available
via_api: available
via_config: na
ref_web: System › Data › Vector store
ref_python: delete_collection
ref_api: DELETE /api/admin/system/resources/vector_store/entry
next:
  - /capabilities/build/vector-search/create-a-collection
  - /capabilities/build/vector-search/overview
---

# Delete a collection

Deleting a collection removes it with every vector and payload in it. Searches against it fail until something creates it again. A module that calls `ensure_collection` when it starts recreates it, empty, on the next start.

## Web UI

Super admins only.

### Open the vector store

In Nexus, open **System** in the sidebar, then the **Data** tab, then **Vector store**.

### Delete the collection

Select the collection and choose **Delete**. The dialog says how many vectors go with it. Type the collection name to confirm, then confirm the delete.

To remove one vector instead, open the collection, select the vector and delete it the same way.

## CLI

Not applicable. There is no `abi` command for the vector store. Use another tab on this page.

## Python

### Delete some entries

```python
store = self.engine.services.vector_store
store.delete_documents("my_module_notes", [doc_id_1, doc_id_2])
```

The collection stays. An empty id list raises `ValueError`.

### Or delete the collection

```python
store.delete_collection("my_module_notes")
```

The calls publish `DocumentsDeleted` and `CollectionDeleted` when the event service is up.

## REST API

The System routes of the Nexus API. Auth: a Nexus session of a super admin (`POST /api/auth/login` returns the access token). Every change is audited.

### Delete the collection

```bash
curl -X DELETE "http://localhost:9879/api/admin/system/resources/vector_store/entry?id=my_module_notes&confirm=my_module_notes" \
  -H "Authorization: Bearer $NEXUS_TOKEN"
```

`confirm` repeats the id. Without it the call answers 409. Success is 204. An `id` of `<collection>/<document id>` deletes one vector.

## Config

Not applicable. `config.yaml` picks the backend, not the collections in it.
