Docfxit
Docfxit

Reputation: 165

Remove-AppxPackage for all users

I would like to remove the Fitbit package from the Microsoft Store apps in Window 10. I have -allusers in the Powershell command but it's telling me Fitbit isn't in the current user.

I don't care what user it's in. I would like to find out why it won't remove it from all users.
I'm running this as Administrator with a user that has Administrator rights.

PS C:\WINDOWS\system32> Get-AppxPackage -allusers *fitbit* | Remove-AppxPackage                                         Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CF1, Package was not found.
Windows cannot remove Fitbit.FitbitCoach_4.4.133.0_x64__6mqt6hf9g46tw because the current user does not have that
package installed. Use Get-AppxPackage to see the list of packages installed.
NOTE: For additional information, look for [ActivityId] 8a315047-822f-0000-d65f-318a2f82d501 in the Event Log or use
the command line Get-AppPackageLog -ActivityID 8a315047-822f-0000-d65f-318a2f82d501
At line:1 char:38
+ Get-AppxPackage -allusers *fitbit* | Remove-AppxPackage
+                                      ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Fitbit.FitbitCo...__6mqt6hf9g46tw:String) [Remove-AppxPackage], PSInval
   idOperationException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

Upvotes: 2

Views: 22044

Answers (1)

js2010
js2010

Reputation: 27423

You need to specify -AllUsers with Remove-AppxPackage. You also need to be in Windows 10 1809 or above for it to work. Below that version, "remove-appxpackage -allusers" may run without error and still not work. Confusingly, the allusers parameter to get-appxpackage has no effect on remove-appxpackage. This will only affect profiles that already exist. "Remove-AppxPackage -User" has never worked.

 Get-AppxPackage -allusers fitbit* | Remove-AppxPackage -allusers

Or

Remove-AppxPackage Fitbit.FitbitCoach_4.4.133.0_x64__6mqt6hf9g46tw -AllUsers

Upvotes: 4

Related Questions