A cludgy work around would be to make a reference to anything you do wish to keep (that is currently not referenced), say a block def, a layer or a text style, do a vla-purgeall, then delete the temporary references. Would require a fair bit of coding, albeit mostly trivial.