<form action="http://www.ccleaner.com/download/downloading"><input type="submit" value="Download CCleaner"/></form>
One way to achieve this is to use Disk Cleanup. However, this tool can clean only files and not registry keys. A better solution is to use CCleaner - a freeware optimization tool that cleans-up all unnecessary files & invalid registry keys.
CCleaner offers an impressive list of features: it can clean not only the usual unused or temporary system files but also files generated by very common applications such as internet browsers (Firefox, Opera, Safari), Microsoft Office, file archiving utilities, Nero, etc. Also, CCleaner checks your Windows registry for problems or inconsistencies and tries to solve them for you.
I found CCleaner to be a tool that's very easy to use. You just select the system components that you want to cleanup, click on Analyze, wait for the scan results to be returned and then click on Run Cleaner. Cleaning up the Windows Registry is just as easy - no expertise required.
One very cool thing is the fact that you can add the Run CCleaner option to the Recycle Bin context menu. If you right click on the Recycle Bin and select this option, you will cleanup your system with one click. CCleaner will empty your Recycle Bin and also analyze your system and remove all the unused or temporary system files.
Another thing I like is the fact that one can easily remove any unwanted startup entries. Just select the undesired startup item and click on the Delete Entry button. It is as easy as that!
Things that could be improved
While working with it - the only thing that bothered me is the fact that, if you have User Account Control (UAC) enabled, you cannot install CCleaner by double-clicking on the setup file. You need to right click on it and select Run As from the contextual menu. If you don't do this, the setup will fail saying that it wasn't able to copy or update files. I'm sure this can be easily fixed in future versions.
CCleaner is an excellent tool. I've been using it for the last few months and I am very satisfied with it. Not only it does a great job at cleaning up your PC but it is also free. You should definitely give it a try.