> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XPackageUninstallUWPInstance

> XPackageUninstallUWPInstance

# XPackageUninstallUWPInstance

Uninstalls a Universal Windows Platform (UWP) instance of the specified package for the current user, if one is currently installed.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT XPackageUninstallUWPInstance(  
         const char* packageName  
)  
```

<a id="parametersSection" />

### Parameters

*packageName*   \_In\_z\_\
Type: char\*

The name of the package to uninstall. This value must match the value of the `Name` attribute for the `Identity` element in the `AppXManifest` for the UWP package.

<a id="retvalSection" />

### Return value

Type: HRESULT

Returns `S_OK` if the package was uninstalled (or was not installed for the user); otherwise, returns an HRESULT error code. Returns `E_NOTIMPL` if the platform does not support this API.

<a id="remarksSection" />

## Remarks

<Note>This function is available only for the PC platform.</Note>

This function uninstalls a Universal Windows Platform (UWP) instance of the package specified in `packageName` for the current user, if an instance is currently installed. If the current user does not have a UWP instance of the specified package currently installed, nothing happens and the function returns `S_OK`.

The publisher of the package to be uninstalled must match the publisher of the package invoking this function; otherwise, an error occurs.

<a id="requirementsSection" />

## Requirements

**Header:** XPackage.h

**Library:** xgameruntime.lib

**Supported Platforms**: Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## See also

[XPackageUninstallChunks](/reference/system/xpackage/functions/xpackageuninstallchunks)\
[XPackage](/reference/system/xpackage/xpackage_members)


## Related topics

- [XPackage](/reference/system/xpackage/xpackage_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XPackageUninstallPackage](/reference/system/xpackage/functions/xpackageuninstallpackage.md)
- [XPackageUninstallChunks](/reference/system/xpackage/functions/xpackageuninstallchunks.md)
- [IXtfApplicationClient::Uninstall](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/uninstall-ixtfapplicationclient-xtfapplication-xbox-microsoft-m.md)
