There are two kinds of installs:
- Clean installs (aka format and install, or wipe and load)
You selected upgrade so it did not do a clean install. Instead it tried to keep as much old stuff working as possible.
As to how to do a clean install. Just use the install medium again. In the first part of the disk format the old partition. That will yield a clean guaranteed install. There are tools to reclaim space and doing that and defragmenting might yield the same disk space. Might. I clean install is fast en sure and it is the method I always used.
Note 1: Windows 10 is a preview. Do not try to use it as a main OS. Support for it will end and there is typically no way to upgrade previews to the full version. So if you want to move to windows 10 in a couple of months you will have to do another install.
Note 2: It is a previous, with possible bugs (heck. Likely bugs!) and with extra logging. Do not use it for anything else than testing. E.g. do not use it for Internet banking, on-line purchases or anything privacy related.
[Edit: Tested windows cleanup - system files]
Starting with a clean installation of windows 7 to test with.
Starting the windows 10 preview iso and selecting upgrade (thus keeping old files)
Installing on the same disk/partition as the previously installed OS.
Now running windows 10. Not much disk space left with the old folders still present.
finally! Running the cleanup.