StoreContext.RequestUninstallStorePackageAsync(Package) StoreContext.RequestUninstallStorePackageAsync(Package) StoreContext.RequestUninstallStorePackageAsync(Package) StoreContext.RequestUninstallStorePackageAsync(Package) StoreContext.RequestUninstallStorePackageAsync(Package) Method

Definition

Attempts to uninstall the specified optional package for the current app. This method also displays a UI dialog that requests permission for the operation.

public : IAsyncOperation<StoreUninstallStorePackageResult> RequestUninstallStorePackageAsync(Package package)
IAsyncOperation<StoreUninstallStorePackageResult> RequestUninstallStorePackageAsync(Package package) const;
public IAsyncOperation<StoreUninstallStorePackageResult> RequestUninstallStorePackageAsync(Package package)
Public Function RequestUninstallStorePackageAsync(package As Package) As IAsyncOperation(Of StoreUninstallStorePackageResult)
Windows.Services.Store.StoreContext.requestUninstallStorePackageAsync(package).done( /* Your success and error handlers */ );

Parameters

package
Package Package Package

The optional package to uninstall for the current app.

Returns

An asynchronous operation that, on successful completion, returns a StoreUninstallStorePackageResult object that provides info about the uninstall operation.

Additional features and requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.Services.Store.StoreContract (introduced v4)

Remarks

You can use this method to free up disk space by uninstalling optional packages that are no longer needed. For example, a game that offers both a single player campaign and a multiplayer campaign might use this method to uninstall the single player campaign at the user's request, after the user has completed that campaign.

When you call this method, the OS displays a dialog that asks the user's permission to uninstall the app package. To silently uninstall an app package without displaying a notification dialog, use UninstallStorePackageAsync or UninstallStorePackageByStoreIdAsync (these methods require access to a restricted capability).

Note

Optional packages and DLC packages are not available to all developer accounts.

See also