title: How to remove except latest 10 record using Mongodb or mongoose lib?
body: <p>I'm using this query:</p>
  
  <pre><code>db.date.remove({
      _id:{ $not:{ $eq: ObjectId("570ba4f66931b8f21a8bf25f") }},
      date:{ $lt: outdated }
  })
  </code></pre>
  
  <p>But it is not working properly. I don't  need to give  ids.</p>
  
  <p>How to remove (delete) except latest 10  record?</p>