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

# XPackageUninstallUWPInstance

> XPackageUninstallUWPInstance

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

## Syntax

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

### 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.

### 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.

## Remarks

> [!NOTE]
>
> This function is available only for the PC platform.

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.

## Requirements

**Header:** XPackage.h

**Library:** xgameruntime.lib

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

## See also

[XPackageUninstallChunks](https://docs.xbox.com/reference/system/xpackage/functions/xpackageuninstallchunks.md)\
[XPackage](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)


## Related topics

- [XPackage (API contents)](https://docs.xbox.com/reference/system/xpackage/xpackage_members.md)
- [Uninstall](https://docs.xbox.com/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/uninstall-ixtfapplicationclient-xtfapplication-xbox-microsoft-m.md)
- [XPackageUninstallPackage](https://docs.xbox.com/reference/system/xpackage/functions/xpackageuninstallpackage.md)
- [XPackageUninstallChunks](https://docs.xbox.com/reference/system/xpackage/functions/xpackageuninstallchunks.md)
- [Publisher Content packages](https://docs.xbox.com/build/core-features/common/packaging/packaging-publisher-content.md)
