This page shows you how to prevent an index and its data from accidental deletion.

This feature requires Pinecone API version 2024-07, Python SDK v5.0.0, Node.js SDK v3.0.0, Java SDK v2.0.0, or Go SDK v1.0.0 or later.

You can prevent index deletion using the Pinecone console. For the index you want to protect, click the three dots to the right of the index name, then click Configure.

Enable deletion protection

You can enable deletion protection when creating a new index or when configuring an existing index. In both cases, you set the deletion_protection parameter to enabled.

To enable deletion protection when creating a new index:

To enable deletion protection when configuring an existing index:

When deletion protection is enabled on an index, requests to delete the index fail and return a 403 - FORBIDDEN status with the following error:

Deletion protection is enabled for this index. Disable deletion protection before retrying.

Disable deletion protection

Before you can delete an index with deletion protection enabled, you must first disable deletion protection as follows: