Delete Windows.old

Have you recently did a in-place upgrade on your windows system but now want to remove the windows.old folder?

Well this is the proper way to remove windows.old without causing a bunch of issues.

First download junction.exe from sysinternals, Extract it to c:tools (create folder if it doesn’t exist)

Open a cmd prompt as admin and run the following:

c:\tools\junction.exe -s -q C:windows.old > %temp%junc.txt

When that is finished open power shell by typing the following in the cmd window

start powershell.exe

then run this powershell script which removes all the junction points

 foreach ($line in [System.IO.File]::ReadLines("$env:tempjunc.txt"))
     if ($line -match "^\\")
         $file = $line -replace "(: JUNCTION)|(: SYMBOLIC LINK)",""
         & c:\tools\junction.exe -d "$file"

switch back to cmd.exe window and run the following 3 commands

 takeown /F C:\windows.old /R /D Y
 cacls C:\windows.old /T /G Everyone:F
 rd /s /q C:\windows.old

Now the windows.old folder should be deleted.

Update: There is an easier method than doing all the steps listed above. Follow this guide.

Leave a Reply