30 May 2016

Delete old Windows FolderEvery now and then, you upgrade your puter.

Let’s say you add an SSD. You copy your old hard drive’s contents to your shiny new SSD, and use your old HDD as a data-only drive. You boot from the new SSD, and poof! You’re done.

Well, sort of…

Your new E: drive is now only a data drive, but alas, there is still an E:\Windows folder, and it’s taking up lots of space.

So, you try to delete E:\Windows… Access Denied, you need permissions, and so on…!

There are a million and one articles out there about how to delete an old, unneeded Windows folder, but they usually involve some piece of software or complicated shenanigans.

Well, forget that! This method is a piece of cake…

So, you might download and try a tool like IOBit’s Unlocker. Well, okay, but that’s kind of unnecessary. And such tools can take a LOOONG time to finish their job.

There are two steps needed to remove old “system” folders like your E:\Windows directory (or whatever drive letter it may have):

  1. Take ownership of the folder
  2. Change permissions so you can successfully delete the folder (and its contents) after you own it

Now, normally, this involves much wailing and gnashing of teeth – or special software.

It’s the first step – taking ownership of the old Windows dir – that’s the biggest headache.

Well, fear not!

Step 1 – Take ownership of the old Windows directory

In Windows 10, right-click the Start button, and select Command Prompt (Admin).

In older versions of Windows, click Start, type “cmd“, right-click Command Prompt, and then choose Run as Administrator.

You need to copy/paste this command into the Admin Command Prompt you just opened:

takeown /f "E:\Windows" /R && icacls "E:\Windows" /grant administrators:F /c /l

Note that “E:\Windows” should be changed (twice!) to match the Windows or other folder you wish to remove.

Command Prompt Take Ownership

This step won’t delete anything yet. All it does is to recursively zoom through the folder you specify and give Administrator accounts on your puter (and therefore you!) control of the folder and all its contents.

Once it’s done running, you can close the Command Prompt window.

Step 2 – Set Permissions on the old Windows directory

Here, you need to navigate to your old Windows folder in File Explorer (Win-E).

Right-click the old Windows folder, and choose Properties.

Click the Security tab, and the click the Edit button:

Windows Folder Security Properties

On the Permissions for Windows dialog that appears, you need to select SYSTEM and TrustedInstaller, and click the Remove button for each.

Windows Folder Permissions Remove

Click OK (twice) to back out of the Properties dialogs when done. If prompted, say yes to applying the changes to all folders, blah blah blah.

Note that if you haven’t done the first step yet, the Remove button will be greyed out. So, take ownership first!

Delete the old Windows folder

Now, just delete the old, now-accessible Windows folder in Explorer. DONE!

If you’d like to be a bit more hardcore, you can open another Admin Command Prompt (as described above), and run the following command:

rmdir /S E:\Windows

Make sure you type the correct drive letter and path!

You can use this same technique to quickly and easily “unlock” other Windows system folders that refuse to be deleted.

Wasn’t that fun?

Get Scottie Stuff!

Get 10% off EVERYTHING from Wednesday Sept 11th through Friday the 13th with code: S3PT3MB3R !!

Delete an old Windows folder the easy way
Tagged on:         

16 thoughts on “Delete an old Windows folder the easy way

  • 30 May 2016 at 13:30

    Thanks for SYSTEM and TrustedInstaller trick! Never heard about ’em before 🙂

  • 22 August 2016 at 00:14

    This doesn’t seem to work for me, followed all steps to the letter and deleting the folder using command prompt (admin) still gives me access is denied on every file.

    • 22 August 2016 at 11:05

      It only works if you’re using an administrator account on your puter (which you probably are). In that case, try using IOBit’s Unlocker program. That has never failed me as a last resort, even if it is a bit pokey sometimes.

      • 13 January 2019 at 20:51

        Thanks Scottie!

  • 11 January 2017 at 18:09

    I posted my blog article linking to yours too soon. I followed your instructions to the “t” and am still getting access denied the whole way through. 🙁

  • 11 January 2017 at 18:16

    I even tried IOBit’s Unlocker and still can’t delete.

    Says I require permission from my computer’s name, which I have, to make changes to this folder.

    I know I can boot from a different OS on a USB stick, but that’s not what my goal is here. My goal is to be able to do this from within Windows.


  • 16 October 2017 at 00:40

    With all due respect, this article is non-sense. Changing ownership will not solve the problem.
    In any case, this method does not work.
    Here is the real “easy way” method:
    Boot from a disk with UBANTU OS.
    Delete the windows folder.
    Time required: 2 minutes.
    Efficiency: 100%
    Best wishes.

    • 16 October 2017 at 10:46

      Of course it will solve the problem – it’s Windows. My method is exactly how I did it on my own puter! Besides, I highly doubt that most non-techie people have a disc with Ubuntu on it handy, and if they’re not familiar with Ubuntu then it’s even less likely they’d go that route.

    • 30 August 2019 at 20:10

      I use this method and its stress-free!!!!, just a get a copy of any Linux distro and do the magic!!

  • 7 April 2018 at 17:35

    Thanks for the pointers.

    The process as documented didn’t work for me, as it didn’t automatically replace the permissions on any sub-items in the windows folder.

    I had to click on the “Advanced” button on the Security tab, and there was an option to replace the permission on all items in the folder there.

    After that, I was able to delete the folder

    • 30 April 2019 at 21:34

      You’re a genius, thank you!

  • 9 April 2018 at 16:17

    Figured I’d give this another go, and still no luck. Still get access denied on every file in the command prompt or a Windows dialog box saying I need to grant permission.

  • 23 June 2018 at 19:55

    I managed to rename the folder to windows.old and then use windows cleanup/system folders to remove.

    • 25 July 2018 at 13:08

      Vannerd is the hero we needed, this worked.

    • 24 September 2018 at 09:53

      Is the correct answer


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.