Removes unused images.