Delete Windows.old

When upgrading to Windows 10 you will notice at the root of your system drive a folder named windows.old that is left behind that takes up approximately 10 GB. This folder is needed if for some reason after upgrading to Windows 10 you decide to roll back to your previous version of Windows. Since Windows 10 is a good stable OS there is most likely little need to keep this folder around.

You might say I can just right click the folder and select delete? This would work for an ordinary folder but since this folder contains OS files your account is not the owner of the files and you will therefore have permissions errors and be unable to delete it.

There are a couple of ways to go about deleting this folder and you can use either the GUI or command line.

If you want to use the GUI you need to open Disk Cleanup by either searching for it or open up Windows Run and type cleanmgr Once you have it open you want to select your Windows(C) drive

Disk Cleanup

You then want to select Cleanup system files

Disk Cleanup

After that you need to select your Windows(C) drive again

Disk Cleanup

You then want to select the Previous Windows Installation

Disk Cleanup

Lastly hit the OK button and Windows.old will be deleted


The other way of deleting the Windows.old file is to use the command line. To accomplish this you need to take ownership of the files and give yourself permissions to those files. In this case we will give ownership to the administrators group and then give that group full control of the files.

takeown /F "%SystemDrive%\Windows.old\*" /R /A

cacls "%SystemDrive%\Windows.old\*.*" /T /grant administrators:F

rd /S /Q "%SystemDrive%\windows.old"



Takeown command changes the owner of the files.
The /F lets you input the file path with the * being a wildcard for all files.
The /R tells it to recurse through all subdirectories. The /A gives the ownership to the administrators group.

Cacls command changes the acls on the files to grant the full control permission.
The /T tells it to change the permissions for all files in all the subdirectories.
The /grant administrators is used to grant the user or in this case group the permissions and the :F is for Full Control.

RD is short for RMDIR and deleted the files.
The /S is used to remove all directories and files.
The /Q is for quiet mode and suppresses the system from asking for an OK.