We can create the index by createIndex() in Mongo DB, to drop the index we can use dropIndex() command.

dropIndex() command will not drop the _id field.



Should mention exact field and value that you have given while created to drop the index

The above deleted index is previously created so it have been dropped, check the createIndex() here.


This will drop the index by passing index name.