Removes unused resources from library.