# deleteOne and deleteMany

*noun*

say it: **“dih-leet-WUN and dih-leet-MEN-ee”** **/dɪˌlitˈwʌn ænd dɪˌlitˈmɛni/**

MongoDB methods that remove documents: deleteOne the first that matches a filter, deleteMany every match.

## What does `deleteOne and deleteMany` do?

`deleteOne` removes the first matching document; `deleteMany` removes every match (all of them with `{}`, so be careful).

```javascript
db.sessions.deleteMany({ expiresAt: { $lt: new Date() } })
```

## In a sentence

- “**deleteMany** with { expired: true } cleared out 40 old coupons.”
- “The cancel route uses **deleteOne** with the order's \_id.”

Level: Apprentice · [More MongoDB terms at this level](https://www.ask-codey.com/glossary?category=mongodb&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/deleteone-and-deletemany
