About Deleting Elasticsearch Indices

You can delete Elasticsearch indices by name using the following in Django shell:

1
2
3
>>> from elasticsearch import Elasticsearch
>>> es = Elasticsearch()
>>> es.indices.delete("myproject_staging_blog_post")

Tips and Tricks Dev Ops Development Django 5.x Django 4.2 Django 3.2 Python 3 Elasticsearch