Skip to main content

XPackageUninstallPackage

Uninstalls a given package.

Syntax

Parameters

packageIdentifier   _In_z_
Type: char*
A string that uniquely identifies the installed package on the disk. For more information about package identifiers, see Manage and license downloadable content (DLC).

Return value

Type: bool Bool tells whether package was uninstalled successfully or not.

Remarks

This function isn’t safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.
XPackageUninstallPackage uninstalls the given package. The package identifier provided will have been returned from XPackageEnumeratePackages or another API that returns a package identifier. XPackageUninstallPackage returns true if the package was uninstalled or false if the package could not be uninstalled. Reasons for a package failing to uninstall include:
  • The package is in use. For example, it is a DLC package the game currently has mounted.
  • The game is running on an xCloud server. Package installation and removal is the responsibility of the server environment.
In the following example, XPackageUninstallPackage is used to uninstall a package to free up space on disk for user.

Requirements

Header: XPackage.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

Conceptual documentation

See also

XPackage
Streaming Installation and Intelligent Delivery
Last modified on August 20, 2026