Remove unnecessary documents.