PHP/MongoDB: Unset all fields in a document
To remove all fields (aside from _id), you can just update with an empty document:

&lt;?php
    $collection-&gt;update(array('name' =&gt; 'Amy'), array());
?&gt;


That will update the document leaving only the _id field.

Note that this won't free up any of the preallocated space for your capped collection.