Important
Deleting documents is not permitted in MongoDB Compass Readonly Edition.MongoDB Compass只读版不允许删除文档。
Select the appropriate tab based on whether you are viewing your documents in List, JSON, or Table view:根据您是在列表、JSON还是表视图中查看文档,选择相应的选项卡:
List View
To delete a document, hover over the document and click the icon.要删除文档,请将鼠标悬停在文档上并单击垃圾桶图标。

Alternatively, you can right-click the desired document and select Delete document from the drop-down menu.或者,您可以右键单击所需的文档,然后从下拉菜单中选择“删除文档”。
After you click the delete button, the document is flagged for deletion. Compass asks for confirmation that you want to remove the document.单击删除按钮后,文档将被标记为删除。Compass会要求您确认是否要删除该文档。
Json View
To delete a document, hover over the document and click the icon.要删除文档,请将鼠标悬停在文档上并单击垃圾桶图标。

Alternatively, you can right-click the desired document and select Delete document in the drop-down menu.或者,您可以右键单击所需的文档,然后在下拉菜单中选择“删除文档”。
After you click the delete button, the document is flagged for deletion. Compass asks for confirmation that you want to remove the document.单击删除按钮后,文档将被标记为删除。Compass会要求您确认是否要删除该文档。
Table View
To delete a document, hover over the document and click the icon.要删除文档,请将鼠标悬停在文档上并单击垃圾桶图标。

After you click the delete button, the document is flagged for deletion. Compass asks for confirmation that you want to remove the document.单击删除按钮后,文档将被标记为删除。Compass会要求您确认是否要删除该文档。
Once you confirm, Compass deletes the document from the collection.确认后,Compass会从集合中删除该文档。
Delete Multiple Documents删除多个文档
You can use the bulk delete operations workflow to delete multiple documents in Compass. For details, see Delete Multiple Documents.您可以使用批量删除操作工作流在Compass中删除多个文档。有关详细信息,请参阅删除多个文档。
Note
You can also use the db.collection.deleteMany() method in the embedded MongoDB Shell to delete multiple documents in a single operation.您还可以使用嵌入式MongoDB Shell中的db.collection.deleteMany()方法在一次操作中删除多个文档。