mongodb/mongodb-drop-index

Drop Index

Remove an index from a collection

mongodb
index
drop

Command

db.users.dropIndex('name_1')

Explanation

Drops an index from a collection. Useful for removing unnecessary indexes or optimizing performance.

Examples

Remove index on item field

db.orders.dropIndex('item_1')