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

# File delete (xbdel.exe)

> File delete (xbdel.exe)

Use this tool to delete one or more files from a remote console.

| Column 1 |
| - |
| \*\*xbdel \*\**file\_name* \[/A\[ \[:]*attributes*] ] \[/S\[ \[:]*levels*] ] \[/U] \[/X\[:]*address\[+\<accesskey>]\[/title]*] |

| Option | Description |
| - | - |
| *file\_name* | The file or files to be deleted. A fully qualified path, including the drive letter, must be supplied. Wildcard characters in *file\_name* are supported. The drive letter in *file\_name* must be prefixed with **X** to specify that the drive is on the remote console. |
| /A\[ \[:]*attributes*] | Deletes files with the specified attributes. **H** Hidden files **R** Read-only files **S** System files **A** Files that are ready for archiving **-** Negation prefix; deletes files that do *not* have the specified flag |
| /S\[ \[:]*levels*] | Deletes files in the directory specified by *file\_name* and all subdirectories down to a depth specified by *levels*, an integer. For example, **xbdel /S:1** will process only the specified directory and subdirectories one level below it. If /S is specified but *levels* is not specified, then all subdirectories will be processed. |
| /U | Deletes files in Update mode. Files will be flagged for deletion during the next system boot. |
| /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 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

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

The drive-D partition is now accessible as a shared scratch space, in the system as well as from within the game OS. To delete a file from this shared drive, use *xbdel* (with or without the /x/title address) to access the drive partitions and files being used by the exclusive resource app. For example, to delete all text files on the scratch drive of the console, use the following:

```cmd theme={null}
xbdel /X:/title XD:\*.txt  
```

or

```cmd theme={null}
xbdel XD:\*.txt 
```

If a legacy XBOX One Software Development Kit title is running, drive D will be the legacy TitleScratch drive, which is not the same as drive D in the system but is accessible in the system via the TitleScratch network share when the title is not running.

### Target 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)
- [Delete directory (xbrmdir.exe)](/tools/tools-console/commandlinetools/xbrmdir.md)
- [Delete Files](/api-reference/file/delete-files.md)
- [XBOX PC Remote (wdRemote.exe)](/tools/tools-pc/commandlinetools/gr-wdRemote.md)
