Remove unneeded sources.