Skip to main content
This action is irreversible. Proceed with caution.
To delete an existing encrypted index, you can load it and then call the delete_index() method.
import cyborgdb_core as cyborgdb

# Get your API key
api_key = "your_api_key_here"  # Replace with your CyborgDB API key

# Create a client (use the same backing store the index was created with)
client = cyborgdb.Client(api_key, cyborgdb.StorageConfig.disk("/tmp/cyborgdb"))

# Provide the SAME 32-byte key used when the index was created.
# Retrieve it from your KMS/secret store — a fresh random key here would fail the load.
index_key = bytes.fromhex("...")  # the 64-char hex of your existing 32-byte index key

# Load the encrypted index
index = client.load_index("my_index", index_key)

# Delete the index
index.delete_index()

API Reference

For more information on deleting an encrypted index, refer to the API reference:

Python API Reference

API reference for delete_index() in Python

C++ API Reference

API reference for DeleteIndex() in C++