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

# Clean (xbcleanup.exe)

> Clean (xbcleanup.exe)

Use this tool to perform cleanup operations on a console.

| Column 1 |
| - |
| **xbcleanup** \[/U] \[/D] \[/P] \[/S] \[/C] \[/L] \[/F] \[/R] \[/N] \[/Drive:\[Retail\|Development\|Ext1-Ext7]] \[/X\[:]*address\[+\<accesskey>]*] |

| Option | Description |
| - | - |
| /U | Uninstalls all developer-installed apps on the target console. Also cancels all apps that are currently in the installation queue. |
| /D | Removes all downloadable content (DLC) packages from the target console. |
| /P | On the target console, uninstalls all apps that were installed by provisioning. This doesn't remove system tools or the Game OS. |
| /S | Restarts the target console. As part of the operation, /S deletes and re-creates the developer's scratch space, drive D. All folder-deployed apps are, effectively, uninstalled. |
| /C | Attempts to remove misconfigured and unregistered apps from the target console. Also cancels all apps that are currently in the installation queue. This operation is best-effort. A restart might be required before the cleanup runs. |
| /L | Deletes all persistent local storage that apps access via the ApplicationData LocalFolder construct. Also removes all persistent local storage for the Gaming eXtensions Development Kit (GXDK) applications. |
| /CR | Resets the data cache that's used by Run from PC deployments on XBOX Series X Dev Kits. |
| /F | Performs a factory reset of the target console, preserving the host name. This operation is exclusive with the other cleanup operations. |
| /R | Performs a full factory reset of the target console. This operation is exclusive with the other cleanup operations. |
| /N | Notify only. Lists the actions that would be performed without modifying the console. |
| /Drive | Specifies the drive on the console to be cleaned up. This doesn't apply to all operations, but only to /U, /S, and /C. |
| /X\[:]*address\[+\<accesskey>]* | - Use this option to specify the host name or address (shown as **Tools IP** on the console) of a targeted console without changing the default console. For details about setting a host name for a console, see [Setting a host name for the console IP address](/home/setup-install/dev-kit-settings/setting-a-hostname). - If you don't use this option, the default console (previously set by [Connect (xbconnect.exe)](/tools/tools-console/commandlinetools/xbconnect)) is used. - Use the *accesskey* string to provide access to a console only to those people who have the access key. - Set the access key by using the command **xbconfig accesskey=your-key**, and then restart your console to make the access key effective. - To access a console that's been configured with an access key, you must include a plus sign (+) and the access key after the IP address or host name of the console. - If an access key is provided when the default console is set by [xbconnect](/tools/tools-console/commandlinetools/xbconnect), the access key is stored as part of the default console's address. - For more information about access keys, see [xbconfig accesskey](/tools/tools-console/commandlinetools/xbconfig). |
| /LC | Specify the locale code. Used to override the default locale code |

## See also

[Command-line tools](/tools/tools-console/commandlinetools/commandlinetools)

[XTF transport errors](/tools/tools-console/commandlinetools/xtf-transport-errors)


## Related topics

- [Command-line tools for console development](/tools/tools-console/commandlinetools/commandlinetools.md)
- [Commandlinetools](/tools/tools-console/commandlinetools/index.md)
- [MarkAppAsProvisioned](/reference/tools/xtf/xtfapplication/classes/IXtfApplicationClient/methods/markappasprovisioned-ixtfapplicationclient-xtfapplication.md)
- [XBOX Manager: updating a console](/tools/tools-console/xbom/manager-tool-updating-console.md)
- [XBOX Manager: managing apps and files](/tools/tools-console/xbom/manager-tool-managing-applications.md)
