Docs Menu

Docs HomeMongoDB Manual


On this page

  • Definition
  • Syntax
  • Example

Adds a single document remove operation to a bulk operations list. Use the Bulk.find() method to specify the condition that determines which document to remove.

Bulk.find.deleteOne() only deletes the first matching document. To remove multiple documents, see Bulk.find.delete().

The command has the following syntax:

Bulk.find( <filter document> ).deleteOne()

For details on the find() method see: Bulk.find()

Create the music collection: [
{ artist: "DOA", genre: "punk" },
{ artist: "Rick Astley", genre: "pop" },
{ artist: "Black Flag", genre: "punk" },
{ artist: "Justin Bieber", genre: "pop" }
] )

The following example:

  • Initializes a Bulk() operations builder.

  • Searches for the genre pop.

  • Deletes Rick Astley, the first matching pop artist, from the collection.

var bulk =;
bulk.find( { "genre": "pop" } ).deleteOne();

To delete all "pop" music, use Bulk.find.delete() instead.

What is MongoDB? →
Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.