# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
pc.collections.delete(name="example-collection")
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
await pc.collections.delete('example-collection');
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
err = pc.DeleteCollection(ctx, "example-collection")
if err != nil {
log.Fatalf("Failed to delete collection: %v", err)
}
fmt.Println("Deleted collection example-collection")
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X DELETE "https://api.pinecone.io/collections/example-collection" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07"
{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Bad request. The request body included invalid request parameters."
},
"status": 400
}Invalid API key{
"error": {
"code": "NOT_FOUND",
"message": "Collection example-collection not found."
},
"status": 404
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}Backups
Delete a collection
Delete an existing collection.
Collections are supported only for pod-based indexes. Pod-based indexes cannot be created with API version 2026-07, so this operation applies to pod-based indexes created with an earlier API version.
DELETE
/
collections
/
{collection_name}
# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
pc.collections.delete(name="example-collection")
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
await pc.collections.delete('example-collection');
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
err = pc.DeleteCollection(ctx, "example-collection")
if err != nil {
log.Fatalf("Failed to delete collection: %v", err)
}
fmt.Println("Deleted collection example-collection")
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X DELETE "https://api.pinecone.io/collections/example-collection" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07"
{
"error": {
"code": "INVALID_ARGUMENT",
"message": "Bad request. The request body included invalid request parameters."
},
"status": 400
}Invalid API key{
"error": {
"code": "NOT_FOUND",
"message": "Collection example-collection not found."
},
"status": 404
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}# pip install --upgrade pinecone
import os
from pinecone import Pinecone
pc = Pinecone(api_key=os.environ["PINECONE_API_KEY"])
pc.collections.delete(name="example-collection")
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
// Reads PINECONE_API_KEY from the environment
const pc = new Pinecone();
await pc.collections.delete('example-collection');
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v7/pinecone"
)
func main() {
ctx := context.Background()
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: os.Getenv("PINECONE_API_KEY"),
})
if err != nil {
log.Fatalf("Failed to create Client: %v", err)
}
err = pc.DeleteCollection(ctx, "example-collection")
if err != nil {
log.Fatalf("Failed to delete collection: %v", err)
}
fmt.Println("Deleted collection example-collection")
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X DELETE "https://api.pinecone.io/collections/example-collection" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2026-07"
Authorizations
Headers
Required date-based version header
Path Parameters
The name of the collection.
Response
The collection has been successfully deleted.
Was this page helpful?