WindowsApps folder in Program Files - Is there a way to delete subfolders?

galingong

Honorable
Nov 5, 2012
19
0
10,510
This is driving me nuts a bit, this folder, WindowsApps takes up ~3.5 gigs in Program Files, and there seems to be no way to remove it (at least parts of it). I've tried uninstalling apps, uninstalling apps via PowerShell, uninstalling apps with CCleaner. The apps disappear from the start menu, however this folder stays the same. Some apps even have more copies of itself (pre-update versions I guess).

nAqztaO.png


Traditional "hard delete" doesn't work either (folder is read-only), when I try to change the attribute it gives an "access denied" error, even though my account is a full control admin. account with UAC turned off etc.

Is there a way to delete those apps somehow?
Thanks, cheers!
 
Solution
3.5GB is nothing. You're not supposed to delete anything there.

Anyway - if you're absolutely sure you want do delete a folder, then here's how:
  • takeown /f "c:\foldername" /r
    icacls "c:\foldername" /reset /t
After that you'll be able to do anything with folder and files in it.

Note - don't use those commands on c:\windows folder or subfolders. You may need to reinstall windows after that.
3.5GB is nothing. You're not supposed to delete anything there.

Anyway - if you're absolutely sure you want do delete a folder, then here's how:
  • takeown /f "c:\foldername" /r
    icacls "c:\foldername" /reset /t
After that you'll be able to do anything with folder and files in it.

Note - don't use those commands on c:\windows folder or subfolders. You may need to reinstall windows after that.
 
Solution

galingong

Honorable
Nov 5, 2012
19
0
10,510
Thank you, that worked. Will remember this. What bothered me about this, is that on a fresh system install that folder does not exist, and I suspect that it was created with the 1709 update (just as a 20GB windows.old folder in C: root, which I managed to delete from Disk Cleanup). Thanks anyway, I'm creating a backup and deleting the whole folder, see if it would have an effect or really just leftover junk from update.