This page shows you how to use the delete operation to remove records from an index namespace.

Delete specific records by ID

Since Pinecone records can always be efficiently accessed using their ID, deleting by ID is the most efficient way to remove specific records.

To remove records from the default "" namespace, don’t specify a namespace in your request.

Delete specific records by metadata

For pod-based indexes, you can delete records by metadata by passing a metadata filter expression to the delete operation.

For serverless indexes, however, it is not possible to delete by metadata. Instead, you can delete records by ID prefix.

Delete all records from a namespace

To delete all records from a namespace, specify the appropriate deleteAll parameter for your client and provide a namespace parameter.

Deleting all records from a namespace also deletes the namespace itself.

Delete all records from an index

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

Was this page helpful?