Cannot Delete WindowsApps folder on Non-System Drives

If you had changed the default app save location to a secondary drive such as D:\ and later reverted the save location to the system drive C:\, and unable to delete the WindowsApps folder on your secondary drive, this article has the solution.

When you access the WindowsApps folder on your secondary drive, you may see the following message:

cannot delete windowsapps folder

You have been denied permission to access this folder.

And the Advanced Security Settings dialog shows the error:

Can’t open access control editor. Unable to perform a security operation on an object that has no associated security.

cannot delete windowsapps folder

Important: Delete the D:\WindowsApps folder only if it is not your default app save folder, and if it doesn’t contain any apps. The default app save location can be checked by opening Settings → System → Storage → Change where new content is saved. Make sure it’s not set to D:\ drive.

cannot delete windowsapps folder

Note: Also, don’t delete the WindowsApps folder on your C:\Program Files folder accidentally.

Cannot Delete WindowsApps folder on non-system drives

The unused WindowsApps folder on your secondary drive can be deleted by taking ownership of the folder and assigning your account full control permissions for the folder. To delete the WindowsApps folder in the D:\, run these commands:

takeown /f d:\windowsapps /r

icacls d:\windowsapps /grant administrators:F /t

rd d:\windowsapps /s /q

cannot delete windowsapps folder

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

5 thoughts on “Cannot Delete WindowsApps folder on Non-System Drives”

  1. Thanks, great guide!
    It help me solving the issue with windowsapps folder on secondary drive.
    Not sure why this folder was there, but perhaps from an older windows installation I had before.

  2. Have to back up the other comments. Trying to set the permissions through the GUI was very unintuitive as someone ignorant to windows permissions and it left a few files still denying access.

    3-hours of wtf-ing at windows and this did the trick in 30 seconds.


    And what on earth are the microsoft people doing with their time? 2020 Microsoft store makes me want to install Vista!

  3. Doesnt work.. it just says

    E:\>rd e:\windowsapps /s /q
    e:\windowsapps\DeepSilver.56575194F7E04_1.0.11.0_x64__hmv7qcest37me – Access is denied.
    e:\windowsapps\MSIXVC\47E1F436-9B8A-4FD9-8639-1AA28B3A97BB – The process cannot access the file because it is being used by another process.
    e:\windowsapps\MSIXVC\47E1F436-9B8A-4FD9-8639-1AA28B3A97BB.xvi – The process cannot access the file because it is being used by another process.

    WHY the f** MICROSOFT still write software in 2020 ?!?! It is CLEAR they CANNOT.

    • @Nayden: See if the instructions here helps:

Leave a Comment