# rmdir - [Command Function](#section1839611420266) - [Syntax](#section329574512266) - [Parameter Description](#section15865747102620) - [Usage](#section107857508261) - [Example](#section11196165315262) - [Output](#section1073811415613) ## Command Function This command is used to delete a directory. ## Syntax rmdir \[_dir_\] ## Parameter Description **Table 1** Parameters

Parameter

Description

Value Range

dir

Indicates the name of the directory to be deleted. The directory must be empty. You can enter a path for this parameter.

N/A

## Usage - 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 Enter **rmdir dir**. ## Output **Figure 1** Deleting directory **dir** ![](figures/deleting-directory-dir.png "deleting-directory-dir")