> For the complete documentation index, see [llms.txt](https://moonlightdb.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://moonlightdb.js.org/docs/collection/deleteone.md).

# deleteOne()

Delete a item from a collection

## Example

```javascript
db.collection("users").deleteOne({
    banned: false,
    accountCreated: "13/02/2023"
}).then(() => {
    //Item deleted from db;
}).catch(error => {
    console.log("error:", error);
});
```

## deleteOne(\<filter>)

| Parameter | Description                                  |
| --------- | -------------------------------------------- |
| filter    | The filter used to select the item to remove |
