Remove-AppxPackage

Remove an app package from a user account.

Syntax
      Remove-AppxPackage [-Package] String [-PreserveApplicationData]
         [-Confirm] [-WhatIf] [CommonParameters]

Key
   -Package String
       An AppxPackage object or the full name of the package to be removed.
        
   -PreserveApplicationData
       Preserve the application data during package removal.
       The application data is available for later use.
        
   -Confirm
       Prompt for confirmation before running the cmdlet.
        
   -WhatIf
       Shows what would happen if the cmdlet runs. The cmdlet is not run.

Get-AppxPackage gets a list of the app packages that are installed in a user profile.

An app package has an .appx file name extension. To get the list of packages for a user profile other than the profile for the current user, you must run this command by using administrator permissions.

This cmdlet was introduced in Windows PowerShell 5.0.

Examples

Remove the app package named package1_1.0.0.0_neutral__8wekyb3d8bbwe from the current user account:

PS C:\> Remove-AppxPackage -Package "package1_1.0.0.0_neutral__8wekyb3d8bbwe"

Remove all app packages from Windows 10, this will remove the Windows Store, Snipping Tool, Sticky Notes, and Appx .NET Framework packages. Use this with extreme caution on Windows 10, do not use on Windows 11:

PS C:\> Get-AppxPackage | Remove-AppxPackage -confirm

“No law can give power to private persons; every law transfers power from private persons to government” ~ Isabel Paterson

Related PowerShell Cmdlets

Get-AppXPackage - List the app packages installed in a user profile.
Remove-AppxProvisionedPackage -


 
Copyright © 1999-2024 SS64.com
Some rights reserved