remove by id in mongodb code example Example: mongo delete row by id db.test_users.deleteOne( {"_id": ObjectId("4d512b45cc9374271b02ec4f")});