Delete indices
Delete an index and all its settings, including links to its replicas.
Deleting an index permanently removes the records and the index configuration, like searchable attributes and custom ranking, from your Algolia application.
Instead of deleting the complete index, you can also delete (clear) just the records, keeping the configuration. See Clear records from an index on this page for more information.
Before you delete an index, consider creating a backup by exporting your index.
Deleting an index doesn’t affect its analytics data.
If you accidentally delete an index, the Algolia support team might be able to restore it but there are no guarantees. However, daily backups are included as part of the Enterprise pricing plan add-on.
Indices with replicas
If the index you want to delete is a replica of another index, you must first unlink it.
If the index is a primary index and has replicas, the replica indices will become independent indices if you delete their primary index.
Delete indices in the Algolia dashboard
To delete an index from the dashboard:
-
Go to the Algolia dashboard and select your Algolia application.
-
On the left sidebar, select Search.
-
Select your Algolia index:
-
Select Manage index > Delete.
-
Type
DELETE
to confirm and click Delete.
Delete indices with the API
To delete an index, use one of these methods:
- API clients:
deleteIndex
- Algolia CLI:
algolia indices delete
Delete multiple indices
To delete more than one index:
- Use
listIndices
(API client) oralgolia indices list
(Algolia CLI) to get your indices - Use
multipleBatch
oralgolia indices delete
to delete multiple indices with a single request.
To delete replica indices, you must first delete their primary indices.
Clear records from an index in the Algolia dashboard
If you only want to delete (clear) the records from an index, keeping the index configuration, follow these steps:
-
Go to the Algolia dashboard and select your Algolia application.
-
On the left sidebar, select Search.
-
Select your Algolia index:
-
Select Manage index > Clear.
-
Type
CLEAR
to confirm and click Clear.
Clear records from an index with the API
To remove only the records from the index, while keeping the settings, synonyms, and rules, use one of the following methods:
- API clients:
clearObjects
- Algolia CLI:
algolia indices clear
Was this page helpful?