# rmdir<a name="EN-US_TOPIC_0000001052170280"></a>

-   [Command Function](#section1839611420266)
-   [Syntax](#section329574512266)
-   [Parameter Description](#section15865747102620)
-   [Usage](#section107857508261)
-   [Example](#section11196165315262)
-   [Output](#section1073811415613)

## Command Function<a name="section1839611420266"></a>

This command is used to delete a directory.

## Syntax<a name="section329574512266"></a>

rmdir \[_dir_\]

## Parameter Description<a name="section15865747102620"></a>

**Table  1**  Parameters

<a name="table1557mcpsimp"></a>
<table><thead align="left"><tr id="row1563mcpsimp"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="p1565mcpsimp"><a name="p1565mcpsimp"></a><a name="p1565mcpsimp"></a><strong id="b170710424141"><a name="b170710424141"></a><a name="b170710424141"></a>Parameter</strong></p>
</th>
<th class="cellrowborder" valign="top" width="52%" id="mcps1.2.4.1.2"><p id="p1567mcpsimp"><a name="p1567mcpsimp"></a><a name="p1567mcpsimp"></a><strong id="b10358846121415"><a name="b10358846121415"></a><a name="b10358846121415"></a>Description</strong></p>
</th>
<th class="cellrowborder" valign="top" width="27%" id="mcps1.2.4.1.3"><p id="p1569mcpsimp"><a name="p1569mcpsimp"></a><a name="p1569mcpsimp"></a><strong id="b171032047111410"><a name="b171032047111410"></a><a name="b171032047111410"></a>Value Range</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="row1570mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p1572mcpsimp"><a name="p1572mcpsimp"></a><a name="p1572mcpsimp"></a>dir</p>
</td>
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p1574mcpsimp"><a name="p1574mcpsimp"></a><a name="p1574mcpsimp"></a>Indicates the name of the directory to be deleted. The directory must be empty. You can enter a path for this parameter.</p>
</td>
<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p1576mcpsimp"><a name="p1576mcpsimp"></a><a name="p1576mcpsimp"></a>N/A</p>
</td>
</tr>
</tbody>
</table>

## Usage<a name="section107857508261"></a>

-   The  **rmdir**  command can only be used to delete directories.
-   The  **rmdir**  command can delete only one directory at a time.
-   The  **rmdir**  command can delete only empty directories.

## Example<a name="section11196165315262"></a>

Enter  **rmdir dir**.

## Output<a name="section1073811415613"></a>

**Figure  1**  Deleting directory  **dir**<a name="fig118404315311"></a>  
![](figures/deleting-directory-dir.png "deleting-directory-dir")

