mongodb / v3.6 / reference / reference-method-db.collection.dropIndexes.html

db.collection.dropIndexes()

db.collection. dropIndexes ( )

Drops all indexes other than the required index on the _id field. Only call dropIndexes() as a method on a collection object.

Warning

This command obtains a write lock on the affected database and will block other operations until it has completed.