Perhaps CCleaner would do what you want?
CCleaner can clean the registry and remove unnecessary files from the system, reclaiming disk space and possibly speeding up the system. You need to be careful with it because you don't want to delete files that are useful and needed for future use.
As stated by Journeyman Geek, I'm not sure whether cleaning the registry is useful. It may help on old systems that have undergone many software installations and removals, but it can be dangerous if the wrong keys are removed. On most systems, cleaning the registry does not have any obvious benefit. My experience with CCleaner has been positive, and I have not experienced any problems associated with CCleaner's registry cleaning feature. The same probably cannot be said of some other registry cleaners, and you should always be careful with the registry. For more information, see this Microsoft article: Are registry cleaners necessary?