r/PowerShell • u/deejay7 • Mar 09 '26
Question Remove-AppxPackage question
Is uninstalling installed apps using Remove-AppxPackage command unreliable or something? I still see mostly the registry method is used for uninstallations.
Apologies, I meant to ask get-package | uninstall-package, but ended up with AppxPackage by error. I don't think editing this question is appropriate, maybe I'll start new post. Thank you all.
5
Upvotes
4
u/SimpleSysadmin Mar 09 '26
Remove-AppxPackage only works for UWP/Store apps (the modern packaged kind). The majority of traditional Win32 applications (.exe installers, MSI packages) aren’t Appx packages at all, so the command simply doesn’t apply to them.
The registry method works because Win32 uninstallers register themselves at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, so invoking that key’s UninstallString is the universal approach that covers almost everything.
3
u/BlackV Mar 09 '26
APP is not for MSI applications so would fail
you could look at at
Uninstall-Packagewhich does support MSI type installs (obviously paired withGet-Package)but the registry is reliable and always there and there is a lot of legacy filth out there
2
u/PutridLadder9192 Mar 10 '26
Ignore all the other answers. Remove-appxprovisionedpackage removes junk like Teams.
-1
u/Modify- Mar 09 '26
If I understand you correctly you want to delete apps. Well, apps can be installed from the MS store. Most will be Appx packages. If you want to remove those completly you need to add the -allusers parameter.
Traditional installers like .MSI or .EXE are uninstalled the traditional way. Most of these packages store their uninstall command in the registry.
If you want to learn more, use Google or ask Chat. Hope this puts you on the right track.