How do I delete a WindowsApps folder?

I have the following problem: I download an app using the Windows Store on Windows 10. The download failed, but the Windows Store does not seem to recognize that. If I go to that app's page on the Store, it will give me the option to download it again. However, the 130GB that it occupies are still allocated on my hard disk, and I can-t find any way to remove the directory. I know which directory it is, but giving myself permissions didn-t work. I also tried booting from Linux and doing sudo rm -rf, but I still get a "permission denied" error.

How do I delete this folder? The guys over at Microsoft Support couldn't help me at all, they even stopped responding after the third failed attempt

2

4 Answers

You could also check in Powershell to see if it shows up and then try removing it from there.

Run this in Powershell to list current packages

Get-AppxPackage -AllUsers | ft

If the app is found in the list then run (edit the NameOfApp)

Get-AppxPackage -AllUsers | where-object {$_.name -like "*NameOfApp*"} | Remove-AppxPackage
3

Here are two methods that may help your situation.

1. Get Access to WindowsApps Folder in Windows 10 Manually.

To get access to the WindowsApps folder, right-click on the folder and then select the Properties option from the list of context menu options.

properties[1]

The above action will open the Properties window. Navigate to the Security tab, and click on the Advanced button appearing at the bottom of the window.

advanced[2]

Once the Advanced Security Settings window has been opened, click on the Change link. You will receive a UAC (User Access Control) prompt. Simply click on the Yes button to continue.

windowsapps-folder-click-change[4]

Now the window will show you all the permissions of the WindowsApps folder. As you can see, this folder belongs to the system, thus you are not able to access it. To change it, click on the Change link appearing next to TrustedInstaller.

windowsapps-folder-click-change-again[5]

The above action will open the Select User or Group window. Here, enter your administrator username and click on the Check Names button. This action will automatically fill in the object name. Now, click on the OK button to continue.

windowsapps-folder-enter-username[6

Here in the main window you can see that the owner of the folder has been changed to your specified administrator account. Before applying the change, make sure that the Replace owner on sub containers and objects checkbox is selected, otherwise you won’t be able to interact with other files and folders inside the WindowsApps folder.

After you’ve done everything, click on OK button to save the changes.

apply-permission-changes[7

As soon as you click on the OK button, Windows starts to change the file and folder permissions. This process may take some time, so sit back and wait until the process is completed.

permission-changing[8

Once the file and folder permissions have been changed, you can easily access it like any other folder in the Program Files folder as long as you are an administrator or have administrator rights.

inside-windowsapps-folder

2. TAKE OWNERSHIP

Another way to do these same steps is to download a registry Hack. To use the Hack, or context-menu method, download this Take Ownership registry hack. Install it, by extracting the ZIP file, double-click InstallTakeOwnership.reg and follow the instructions.

Take-Ownership

Next, go to your WindowsApps folder (C:Program Files by default, but you may need to unhide it by clicking View at the top of File Explorer, then ticking the Hidden items box).

Once you can see WindowsApps, right-click it and click the new Take Ownership button in the context menu. A Powershell prompt will open and run a command to take control of the folder. Once this is done, you can access WindowsApps!

take-ownership

Standard warning: Registry Editor is a powerful tool, make sure to back up the Registry (and your computer!) before making changes.

Back up the registry manually, or create a system restore point.

Back up the registry manually.

  1. From the Start menu, type regedit.exe in the search box, and then press Enter. If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

  2. In Registry Editor, locate and click the registry key or subkey that you want to back up.

  3. Click File > Export.

  4. In the Export Registry File dialog box, select the location to which you want to save the backup copy, and then type a name for the backup file in the File name field.

  5. Click Save.

Create a restore point

  1. From the Start menu, type create a restore point.

  2. Select Create a restore point from the search results.

  3. Choose Create, and then follow the steps to create a restore point.

1

Using powershell as admin and changing the name of the app accordingly:

cd "C:\Program Files\windowsapps"
takeown /F Microsoft.Minecraft* /r /d y
rm -r -fo Microsoft.Minecraft*

My old method: run CMD as admin go to the WindowApps folder

Do this for each folder you want removed. Make sure you 'uninstall' the app first, if it's installed. Replace "" with your folder name, no quotes needed since Microsoft makes all these folders without spaces.

takeown /f /r icacls /grant everyone:f /t rd /s/q

I have created a script using variable for the folder name, still working on a better version.

1

You Might Also Like