Remove-AppxPackage

Removes an app package from a user account.

Syntax

Remove-AppxPackage
      [-Package] <String>
      [-PreserveApplicationData]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AppxPackage
      [-Package] <String>
      -User <String>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AppxPackage
      [-Package] <String>
      [-AllUsers]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AppxPackage cmdlet removes an app package from a user account. An app package has an .appx file name extension.

Examples

Example 1: Remove an app package

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

This command removes an app package named package1_1.0.0.0_neutral__8wekyb3d8bbwe from the account of the current user.

Required Parameters

-Package

Specifies an AppxPackage object or the full name of a package.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-User

{{Fill User Description}}

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-AllUsers

{{Fill AllUsers Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-PreserveApplicationData

Specifies that the cmdlet preserves the application data during the package removal. The application data is available for later use. Note that this is only applicable for apps that are under development so this option can only be specified for apps that are registered from file layout (Loose file registered).

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String[]

Inputs

Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage

An AppxPackage object that contain information, including the full name of the app package.

Outputs

None