After a major update Windows 10 leaves a folder named Windows.old in the system drive. You may remove it to save disk space and prevent potential harmful exploits.
- Click in Windows’ search field, type Cleanup, then click Disk Cleanup.
- Click the “Clean up system files” button.
- Wait a bit while Windows scans for files, then scroll down the list until you see “Previous Windows installation(s)“.
- Check the box next to the entry.
- Click OK.
- Open a command prompt (cmd.exe) as Admin
- Execute 3 below commands:
takeown /f C:\Windows.old /r /d y icacls C:\Windows.old /grant administrators:F /t rmdir C:\Windows.old /s /q
takeown: takes ownership of a folder.
icacls: grants permissions to a user against a folder
rmdir: deletes a folder
3. If some files still cannot be deleted then please restart your computer and re-excecute the above 3 commands.
4. If some files still cannot be deleted after the restart then please execute 3 below commands:
icacls C:\Windows.old /T /Q /C /RESET icacls C:\Windows.old /grant admin:F /t rmdir C:\Windows.old /s /q
admin: your current logged in username.
5. If some files still cannot be deleted then please click Cortona icon, type msconfig, click on System Configuration link, click Boot tab, select Safe boot check box, select Minimal option, click OK, restart your computer and then execute the 3 commands in the 2nd step and the 3 commands in the 4th step.