Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Remove-AppxPackage

Last Updated: 5/19/2017

SYNOPSIS

Removes an app package from a user account.

SYNTAX

RemoveByPackageSet (Default)

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

UserSet

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

AllUsersSet

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.

PARAMETERS

-AllUsers

{{Fill AllUsers Description}}

Type: SwitchParameter
Parameter Sets: AllUsersSet
Aliases: 

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

-Package

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

Type: String
Parameter Sets: (All)
Aliases: 

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
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.

Type: SwitchParameter
Parameter Sets: RemoveByPackageSet
Aliases: 

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

-User

{{Fill User Description}}

Type: String
Parameter Sets: UserSet
Aliases: 

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.String[]

Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage

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

OUTPUTS

None

NOTES

Package Manager API

How to Add and Remove Apps

Get-AppxPackage

Get-AppxPackageManifest

Add-AppxPackage

Move-AppxPackage

Get-AppxLog

Get-AppxLastError

© 2017 Microsoft