What will happen when you remove a document from database in MongoDB? Does MongoDB remove it from disk?
Yes. If you remove a document from database, MongoDB will remove it from disk too. When you remove a document from a MongoDB database, MongoDB marks the space occupied by the document as free and available for reuse within the database. However, MongoDB does not immediately remove the document data from the disk. Instead, the … Read more