How to delete your Windows.old folder

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

recovery options

Refresh your Windows 8.1 PC

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:

%systemdrive%\Windows.old

Windows 8.1 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:

Windows 8.1 check out Windows.old properties

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:

cleanmgr.exe

When the Disk Cleanup wizard appears select your drive and hit OK.

Windows 8.1 Disk Cleanup Drive Selection

Click the Clean up system files button in the bottom left corner of the description box.

Windows 8.1 Disk Cleanup Clean up System Files

Place a check in Previous Windows installations(s) and choose OK

Windows 8.1 Delete Previous Windows Installation

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

Take ownership of Windows.old

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

Grant Administrators access to Windows.old so you can delete it

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\

RMDIR 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.

That’s it!

About

Connect with Vonnie on Twitter

Posted in Windows, Windows 7, Windows 8, Windows 8.1 Tagged with:
  • Abimuktheeswaran Brothers

    if i try to delete means . it says item could not found

  • Cheryl Meyers

    It didn’t work the first time. So i did it again. Gone. Thank you

  • BugraKatranci

    Thanks i guess it is working, i was searching for professional ways like this people were talking about copying folders into new ones lol

  • Ivor Benjamin

    In Windows 8/8.1 you appear to need an updated version of the 2nd command:

    cacls C:Windows.old*.* /T /grant administrators:F
    becomes
    icacls C:Windows.old*.* /T /grant administrators:R

    (?)

    Didn’t work for me though. 🙁