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

# Delete directory (xbrmdir.exe)

> Delete directory (xbrmdir.exe)

Use this tool to delete a directory on a remote console.

| Column 1 |
| - |
| \*\*xbrmdir \*\**directory* \[/F] \[/U] \[/X\[:]*address\[+\<accesskey>]\[/title]*] |

| Option | Description |
| - | - |
| *directory* | The directory to be deleted. A fully qualified path that has the drive letter must be supplied. For details, see the [Remarks](#remarks) section later in this topic. |
| /F | Force-deletes the directory and all the files and subdirectories that are in it. |
| /U | Deletes the directory in Update mode. The directory is deleted during the next system start. |
| /X\[:]*address\[+\<accesskey>]\[/title]* | - 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 console access 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 configured with an access key, 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 |

## Remarks

### Destination files and directories in the shared scratch-drive partition

The `drive-D` partition is now accessible as a shared scratch space in the system and from within the Game OS. To delete a directory from this shared drive, use xbrmdir (with or without **/x/title address**) to access drive partitions and files that are being used by the exclusive resource app. For example, to delete the foo directory in a title's game-data subdirectory on the console, use the following:

```
xbrmdir /X:/title XD:\foo  
```

or

```
xbrmdir XD:\foo  
```

If a legacy XBOX One Software Development Kit title is running, drive D is the legacy TitleScratch drive, which isn't the same as drive D in the system. However, drive D is accessible in the system via the TitleScratch network share when the title isn't running.

### Destination files and directories in an app container

While an exclusive app is running, the app container is read-only and mapped to drive G in the `exclusive` partition.

Apps packaged at build time are read-only. Files and directories can be copied for these apps but can't be added, deleted, or modified.

## See also

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

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

[Connect (xbconnect.exe)](/tools/tools-console/commandlinetools/xbconnect)


## Related topics

- [Command-line tools for console development](/tools/tools-console/commandlinetools/commandlinetools.md)
- [Commandlinetools](/tools/tools-console/commandlinetools/index.md)
- [File delete (xbdel.exe)](/tools/tools-console/commandlinetools/xbdel.md)
- [XBOX PC Remote (wdRemote.exe)](/tools/tools-pc/commandlinetools/gr-wdRemote.md)
- [Directory (xbdir.exe)](/tools/tools-console/commandlinetools/xbdir.md)
