← All tutorials

GoCareerGo Tutorials

MongoDB Tutorial

Documents, collections, CRUD, aggregation, Atlas and driver connectivity.

deleteOne()

Removes the first document matching a filter from a collection.

db.users.deleteOne({ _id: 1 });