After upgrading to Windows 10, I immediately deleted the Windows.old folder using disk cleanup. This in turn recovered around 20 gigabytes in space on my computer.
I noticed odd file names from previous updates (example:c:\2d51a0107296557123f92939e121) that I could not delete even if I took ownership or gave my user permission (including subdirectories) to delete the information. Bleachbit failed and so did CCleaner.
Here’s how I got rid of the files –
First go to a command prompt as an administrator. At the prompt, type –
C:\>cd /d c:\
C:\>robocopy /e /purge /b empty 2d51a0107296557123f92939e121
(Replace 2d51a0107296557123f92939e121 with the folder you want to delete)
You can now delete the folders including the empty folder.
If the folder still does not delete, type the following at a command prompt –
Takeown /F 2d51a0107296557123f92939e121
icacls 2d51a0107296557123f92939e121 /grant administrators:F