remove unused resources.