How to clean up WindowsApps folder?

Page 2 of 3 FirstFirst 123 LastLast
  1. dalchina's Avatar
    Posts : 32,997
    Win 10 Pro (1903) (2nd PC is 21H1)
       #11

    There are many examples of the use of Powershell for removing apps in this tutorial.
    Uninstall Apps in Windows 10

    Some sections relate only to uninstalling the app (i.e. leaving the folder behind) whereas others use provisioning options such those given my mngerhold above.

    Option 13, for example (the last) may be of interest.

    However, I've tried running 2 or 3 such commands on Yourphone (uninstalled on my PC but the folder remains) but always get an error.
      My Computers

  2. Steve C's Avatar
    Posts : 6,916
    Windows 10 Pro 64 bit
       #12

    dalchina said:
    There are many examples of the use of Powershell for removing apps in this tutorial.
    Uninstall Apps in Windows 10

    Some sections relate only to uninstalling the app (i.e. leaving the folder behind) whereas others use provisioning options such those given my mngerhold above.

    Option 13, for example (the last) may be of interest.

    However, I've tried running 2 or 3 such commands on Yourphone (uninstalled on my PC but the folder remains) but always get an error.
    I've tried the command below to delete older versions of apps but it returns without deleting anything.

    powershell -command "Get-appxpackage -allusers *app name* | Remove-AppxPackage -allusers"
      My Computers

  3. dalchina's Avatar
    Posts : 32,997
    Win 10 Pro (1903) (2nd PC is 21H1)
       #13

    Similarly (option 13 from above) I tried
    Get-AppxPackage -AllUsers -PackageTypeFilter Bundle -name "*Microsoft.YourPhone_1.21022.202.0_x64__8wekyb3d8bbwe*" | Remove-AppxPackage -AllUsers

    and
    Get-AppxPackage -AllUsers -PackageTypeFilter Bundle -name "*Microsoft.YourPhone_2021.402.1917.0_neutral_~_8wekyb3d8bbwe*" | Remove-AppxPackage -AllUsers

    assuming I've got that right- no errors, no folder removal.

    ************ success *************
    C:\WINDOWS\system32>powershell -command "Get-appxprovisionedpackage -online | where-object {$_.packagename -like '*Microsoft.YourPhone*'} | remove-appxprovisionedpackage -online"


    Path :
    Online : True
    RestartNeeded : False

    C:\WINDOWS\system32>

    - from option 11
    How to clean up WindowsApps folder?-1.jpg

    Whilst this worked for the Skype folder:
    "Get-appxpackage -allusers *Microsoft.SkypeApp* | Remove-AppxPackage -allusers"

    (from Option 11)
    Last edited by dalchina; 4 Weeks Ago at 07:31.
      My Computers

  4. idgat's Avatar
    Posts : 1,180
    Windows 10 Pro
       #14

    Don't delete at first - just re-name, like just adding the word OLD to the end. As in BegoneFolder > BegoneFolderOLD. Then see what affect it has. If none, then what the hell, delete it. If the system fails, boot into a Linux, rename the folder back and reboot to Windows.

    But ..... don't forget to image, make changes, re-image, make change, re-image .... oh well, you get the picture.

    In the overall scheme of things, those folders are not doing any harm, and the total space being used is negligible compared to a complete installation, OS and programs. . If space is that critical, maybe time to be looking at a larger drive?
      My Computer


  5. Posts : 178
    Window 10 Home 20H2 x64 (build SO 19042.1052)
    Thread Starter
       #15

    dalchina said:
    Where possible reinstall the program, then uninstall it with an uninstaller.

    Normally with 'desktop' programs there's an option of a forced uninstall, where you point the uninstaller at either an exe file or a folder and then let it scan for and remove remnants. I have no idea or experience of this for UWP apps.. but you can see if that exists.

    ** Note this explanation of where these large folders may originate:
    windows 10 - WindowsApps folder still contains large folders from deleted Microsoft Applications - Super User

    If you wish to simply delete those folders, it seems Treesize can't do it; rather than change permissions, boot from a live boot disk and then there are no permissions problems.
    this is the step for forced unistall

    for folder:
    How to clean up WindowsApps folder?-disinstallazione_forzata_1.png

    or for exact file .exe
    How to clean up WindowsApps folder?-disinstallazione_forzata_2.png

    don't find anythings
    How to clean up WindowsApps folder?-disinstallazione_forzata_dopo.png

    for disinstall galaxy explorer:

    i have installed e then removed with revo pro:

    How to clean up WindowsApps folder?-galaxy_1.pngHow to clean up WindowsApps folder?-galaxy_2.pngHow to clean up WindowsApps folder?-galaxy_3.png
    removed:
    How to clean up WindowsApps folder?-galaxy_4.pngHow to clean up WindowsApps folder?-galaxy_5.pngHow to clean up WindowsApps folder?-galaxy_6.png

    but not work...

    for other test with powershell, There is an error in command

    How to clean up WindowsApps folder?-galaxy_7.png

    - - - Updated - - -

    Code:
    PS C:\WINDOWS\system32> remove-AppxProvisionedPackage -package Microsoft.MicrosoftGalaxyExplorer_2.0.10.0_x64__8wekyb3d8bbwe -online
    remove-AppxProvisionedPackage : Errore non specificato.
    In riga:1 car:1
    + remove-AppxProvisionedPackage -package Microsoft.MicrosoftGalaxyExplo ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Remove-AppxProvisionedPackage], COMException
        + FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPackageCommand
    - - - Updated - - -

    dalchina said:
    There are many such questions about cleaning apparently redundant folders... this is a typical answer:
    How to safely free up space in C:\Program Files\WindowsApps - Quora

    Perhaps there is a need for one... but this is something Windows should maintain without intervention.
    are you referring to the first answer? do I buy a new hard disk and then I move all the useless things to it, which will gradually increase, only to have a few applications to work? The answer to the increase in disk space is senseless.

    - - - Updated - - -

    Steve C said:
    The WindowsApps folder often contains multiple versions of the same app for no obvious useful reason. Is there a utility to clean out the redundant old versions?
    I tried dism ++ but it doesn't find anything in the provisioned apps nor in the normal ones.

    How to clean up WindowsApps folder?-galaxy_8.png

    - - - Updated - - -

    mngerhold said:
    I can only touch on it here, as it is complex, and it appears MS does not want you, the ordinary user, messing about - or they would have made it easier. What follows is only an extract from the enormous amount of information on the links already provided by others. Firstly, to see all the available apps, you must run Powershell as an administrator:
    Get-AppxPackage -allusers * | Select Name, PackageFullName
    will show a long list. I have removed everything I can (in the past, new rubbish may have appeared since), but there are still 121 (yes, one hundred and twenty one) apps listed. Many of these are services and other things one should not interfere with. To remove apps (packages) that are amenable, there are two steps:

    First one must uninstall (for the current user) with something like
    Get-AppxPackage *zunemusic* | Remove-AppxPackage
    but that only uninstalls (despite the name of the command), it does not remove from disk. Once the app is not installed for any user (and that can be tricky), one can 'de-provision' it. To find out which apps are provisioned (ready to be installed for new users), use
    Get-AppxProvisionedPackage -online | select packagename
    Mine shows only two:
    PackageName
    -----------
    Microsoft.MicrosoftEdge.Stable_93.0.961.44_neutral__8wekyb3d8bbwe
    Microsoft.ScreenSketch_2020.814.2355.0_neutral_~_8wekyb3d8bbwe

    These can be de-provisioned with something like :
    Remove-AppxProvisionedPackage -online -packagename <string>
    but note that the command does not take wildcards as easily as the Get-AppxPackage command (the <string> must be the full package name). This operation prevents the app re-installing for new users. If it is not installed for anyone, it will (may) eventually disappear of its own accord from the WindowsApps folder. There will (I think) always be something left in that folder.

    There are a number of (often Powershell-based) tools out there to help you, I have tried some but can't recommend any, as I have not tested them that much, I have done it the hard way. What is annoying is how multiple versions seem to hang about in the folder, no matter how many times one runs the built-in cleaup process, or uses DISM commands. My WindowsApps folder is only ~400MB, and I can't be bothered to trim that.
    I have tried some of the commands you have listed. The app does not appear in the list or if it appears it is only the latest version. The app doesn't even appear in the "provisoning" ones, in this case I can't remove anything with powershell. What else can I do in your opinion? if you tell me the names of programs I will do the test myself. Unfortunately I have several gigabytes to free and I can take some time to try a solution ...

    - - - Updated - - -

    dalchina said:
    There are many examples of the use of Powershell for removing apps in this tutorial.
    Uninstall Apps in Windows 10

    Some sections relate only to uninstalling the app (i.e. leaving the folder behind) whereas others use provisioning options such those given my mngerhold above.

    Option 13, for example (the last) may be of interest.

    However, I've tried running 2 or 3 such commands on Yourphone (uninstalled on my PC but the folder remains) but always get an error.
    I have tried almost all of them but they are not for the case in question. 13 is interesting. But can bundled apps be run? Do I have are only in the system and cannot be used? For example "ZuneVideo" comes out of my list but I can't run it ... What are these apps for?

    - - - Updated - - -

    idgat said:
    Don't delete at first - just re-name, like just adding the word OLD to the end. As in BegoneFolder > BegoneFolderOLD. Then see what affect it has. If none, then what the hell, delete it. If the system fails, boot into a Linux, rename the folder back and reboot to Windows.

    But ..... don't forget to image, make changes, re-image, make change, re-image .... oh well, you get the picture.

    In the overall scheme of things, those folders are not doing any harm, and the total space being used is negligible compared to a complete installation, OS and programs. . If space is that critical, maybe time to be looking at a larger drive?
    "Then see what affect it has, If none ..."<--- And how is this done?

    For the images I'm organizing ... I'm a pain in the ass when making them ...

    For disk space see my previous answer, in some cases giving this advice does not make sense. Especially when there are bugs in the software ...
      My Computer

  6. dalchina's Avatar
    Posts : 32,997
    Win 10 Pro (1903) (2nd PC is 21H1)
       #16

    My post #13 gives two examples that definitely removed folders of apps I had uninstalled.
      My Computers


  7. idgat's Avatar
    Posts : 1,180
    Windows 10 Pro
       #17

    einstein1969 said:
    "Then see what affect it has, If none ..."<--- And how is this done?
    When you change the folder name, Windows can't "find" it. If it needs that folder, you'll get some indication - error message >>> at worst, system fails to boot. If there is any problem, use Linux to go back and change the folder name

    For disk space see my previous answer, in some cases giving this advice does not make sense. Especially when there are bugs in the software ...
    Apologies, I must've missed that bit about a larger drive, but anyway, if the system is problematic, then maybe it's time to consider a wipe-and-clean-install.

    EDIT INSERT
    einstein1969 said:
    do I buy a new hard disk and then I move all the useless things to it, which will gradually increase, only to have a few applications to work? The answer to the increase in disk space is senseless.

    Nope, didn't miss it, this post wasn't avaialable at the time I responded ...

    Anyhow, yes, under normal circumstances, this would be a viable option. Installations are always full of "dead"/unused/superfluous files, leftovers from various installations and/or uncleaned-up files created when a program just runs normally. In an ideal world, Windows or the program should remove unneeded files after use, but it just doesn't happen (e.g. poorly written software - not Windows of course, that's perfect ). For this reason, you will find that many users opt for a clean install option every 12-18 months.

    As I indicated, apart from the system being problematic (Why? What's it doing?) these files are doing nothing. Image the old drive, restore to a new larger drive and the space issue is solved .. and just forget about the leftover stuff .... until you decide it really is time for a clean install.


    For the images I'm organizing ... I'm a pain in the ass when making them ...

    Troubleshooting and problem solving is all well and good, and can give a level of satisfaction if/when successful. But there comes a time when a user has to consider how much more time and effort needs to be spent. Sometimes, a user needs to know when time is up. This thread has been going on for 10 hours, 3 to 4 times longer than it would take to do an install of the OS and programs, and a restore of user files, But, who knows ... the next response may be the total solution. Then on the other hand ..... it could be just more . Food for thought.
      My Computer

  8. Steve C's Avatar
    Posts : 6,916
    Windows 10 Pro 64 bit
       #18

    There are so many apparent redundant old app versions in WindowsApps that I will leave it alone until a reliable utility is available to clean the folder or Windows is modified to do so.
      My Computers

  9. dalchina's Avatar
    Posts : 32,997
    Win 10 Pro (1903) (2nd PC is 21H1)
       #19

    I see no risk if a valid Powershell command is used as I illustrated successfully in two cases in post #13. The problem is choosing the appropriate command as in the tutorial.

    Brink confirms there is no one simple way of doing this- see discussion under the tutorial:

    Uninstall Apps in Windows 10
      My Computers


  10. Posts : 178
    Window 10 Home 20H2 x64 (build SO 19042.1052)
    Thread Starter
       #20

    Sorry, I got lost. For those who advised me to reinstall every 12-18 months, I just want to say that I reinstalled from scratch in March and already in August I had problems. For those who have some applications it is fine to reinstall from scratch but those who have a system with many applications can become a big job ... Many applications require settings / customizations that are lost by reinstalling ...

    @dalchina
    I have tried all the commands from post 13 but they don't work.

    How to clean up WindowsApps folder?-immagine.png

    how should i do?
      My Computer


 
Page 2 of 3 FirstFirst 123 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:34.
Find Us




Windows 10 Forums