Docs Menu
Docs Home
MongoDB Manual
/ / /


On this page

  • Definition
  • Syntax
  • Example

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

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

The command has the following syntax:

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

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 pop music from the collection.

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

To delete only the first matching document, use Bulk.find.deleteOne() instead.

← Bulk.find.collation()