Remove unneeded resources.