If you perform a custom Windows installation and choose not to format the hard drive or you upgrade Windows to a newer version you’ll most likely see a folder on your C:\ drive named Windows.old.
Windows 8 or 8.1 users will also see the Windows.old folder after doing a Refresh.
Incidentally, a Refresh essentially installs Windows on-top of itself while perserving your personal files and settings. You can get there from the Start Screen by typing
Finding old files
That obscure Windows.old folder contains not only your old Windows installation files, which probably isn’t a big deal, but also your old Documents, Settings and Programs.
So if you can’t find an elusive photo or document after upgrading Windows then this is the first place to search.
Press Windows Key + r and type this in the Run box:
Now you can dig into your folders and save off your old stuff.
Deleting Windows.old with Disk Cleanup
After you rescue your files we should delete the folder. Mainly because the Windows.old folder is unnecessary and often consumes an inordinate amount of space (sort of like the WinSxS folder).
For example check out the Properties on my Windows.old folder:
Why am I wasting 5 gigs?
Unfortunately, you can’t remove it by simply pressing the Delete key because your user account doesn’t have ownership of the folder.
Thankfully we can circumvent this by using our good old friend Disk Cleanup. Just make sure you know the Administator password because non-admins can’t pull these tricks off.
Press Windows Key + r and paste in the following command:
When the Disk Cleanup wizard appears select your drive and hit OK.
Click the Clean up system files button in the bottom left corner of the description box.
Place a check in Previous Windows installations(s) and choose OK
Removing Windows.old via the Command Prompt
Killing Windows.old from the command prompt is trickier but undeniably cooler.
Open the the command prompt as an Administrator by right-clicking it and choosing Run as Administrator.
We’ve got a trio of commands to run.
In the elevated prompt paste in the following line:
takeown /F C:\Windows.old\* /R /A
takeown allows you as an Administrator to take ownership of a folder owned by another user or process.
The weird /F C:\Windows.old\* thingy means you want to take ownership of all the files in that Windows.old folder.
/R makes the command recursive. In other words, you’ll take ownership of the parent folder, Windows.old, and all the subfolders and files contained inside.
The /A thing gives ownership to all accounts in the Administrator group (not just the currently logged in admin user).
Okay now paste in this command:
cacls C:\Windows.old\*.* /T /grant administrators:F
cacls let’s you modify the access control on specific files.
Here we’re telling Windows that we want to give the Administrators group carte-blanche access over everything inside the C:\Windows.old folder.
We’re basically hijacking the folder.
Now paste in this final command:
rmdir /S /Q C:\Windows.old\
This powerful command essentially drops an Atom bomb on the folder.
rmdir /S removes all directories and subfolders and the /Q zaps everything without bothering you for confirmation.
After running these commands you’ll undoubtedly see a prodigious sum of text scroll up the screen at a lightening speed.
That’s fine – Windows outputs the result of each file modification so you’re just seeing the results of each modified file.
The Bottom Line
If you ignore the Windows.old folder, Microsoft automatically purges it after 28 days; however, if you’re pressed for space and need it immediately you can easily delete the folder by using the Clean up systems files button in Disk Cleanup or taking ownership of the folder and removing it via the command line.