# Model.findByIdAndRemove()

**URL:** <https://forum.freecodecamp.org/t/model-findbyidandremove/484564>\
**Category:** freeCodeCamp Contributors\
**Tags:** contributing\
**Created:** [November 7, 2021, 11:37am UTC](https://forum.freecodecamp.org/t/model-findbyidandremove/484564 "2021-11-07T11:37:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinfiscina](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/martinfiscina/32/237038_2.png) [@martinfiscina](https://forum.freecodecamp.org/u/martinfiscina)\
**Post date:** [November 7, 2021, 11:37am UTC](https://forum.freecodecamp.org/t/model-findbyidandremove/484564/1 "2021-11-07T11:37:08Z")

</div>

**What is your hint or solution suggestion?**

```auto
Model.findByIdAndRemove(id, options, callback)

callback: (err, removedDoc)=>if(err)...; done(null, removedDoc)

```

**Challenge:** Delete One Document Using model.findByIdAndRemove

**Link to the challenge:**

[https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/delete-one-document-using-model.findbyidandremove](https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/delete-one-document-using-model.findbyidandremove)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [May 8, 2022, 11:37pm UTC](https://forum.freecodecamp.org/t/model-findbyidandremove/484564/2 "2022-05-08T23:37:34Z")

</div>

Closed on May 8, 2022, 11:37pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
