Skip to main content
This page shows you how to delete documents by ID, by metadata filter, or all at once from a namespace in a document index. For a legacy vector index, see Delete vectors.
Deletes consume write units (WUs). See Understand Pinecone cost for how delete cost is calculated.

Delete documents

In an index with a document schema, delete documents by ID, by metadata filter, or delete the whole namespace’s contents. A request specifies exactly one of ids, filter, or delete_all, and can name up to 1,000 IDs.

Delete documents by ID

To delete specific documents, pass their IDs:

Delete documents by metadata

To delete every document matching a metadata filter expression, pass a filter. The response reports how many documents matched:

Delete all documents in a namespace

To empty a namespace without deleting the namespace itself, pass delete_all:
A delete by ID and a delete_all return an empty response body. Only a filtered delete reports matched_records.
Text-match operators ($match_phrase, $match_all, $match_any) aren’t supported in a filtered delete, and a request carrying one is rejected with a 400. To delete documents by text match, search for them first and delete the IDs the search returns.
For the full request and response schema, see Delete documents.

Delete an entire namespace

To delete an entire namespace and all of its documents, see Delete a namespace.

Delete an entire index

To remove all documents from an index, delete the index and recreate it.

Data freshness

Pinecone is eventually consistent, so there can be a slight delay before new or changed documents are visible to queries. You can view index stats to check data freshness.