{
    "mode": "man",
    "parameter": "rmdir",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/rmdir/1/json",
    "generated": "2026-06-12T16:25:18Z",
    "synopsis": "rmdir [OPTION]... DIRECTORY...",
    "sections": {
        "NAME": {
            "content": "rmdir - remove empty directories\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "rmdir [OPTION]... DIRECTORY...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Remove the DIRECTORY(ies), if they are empty.\n",
            "subsections": [
                {
                    "name": "--ignore-fail-on-non-empty",
                    "content": "ignore each failure that is solely because a directory\n\nis non-empty\n",
                    "long": "--ignore-fail-on-non-empty"
                },
                {
                    "name": "-p --parents",
                    "content": "remove  DIRECTORY and its ancestors; e.g., 'rmdir -p a/b/c' is similar to 'rmdir a/b/c\na/b a'\n",
                    "flag": "-p",
                    "long": "--parents"
                },
                {
                    "name": "-v --verbose",
                    "content": "output a diagnostic for every directory processed\n\n--help display this help and exit\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "--version",
                    "content": "output version information and exit\n",
                    "long": "--version"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written by David MacKenzie.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3  or  later\n<https://gnu.org/licenses/gpl.html>.\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "rmdir(2)\n\nFull documentation <https://www.gnu.org/software/coreutils/rmdir>\nor available locally via: info '(coreutils) rmdir invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                    RMDIR(1)",
            "subsections": []
        }
    },
    "summary": "rmdir - remove empty directories",
    "flags": [
        {
            "flag": "",
            "long": "--ignore-fail-on-non-empty",
            "arg": null,
            "description": "ignore each failure that is solely because a directory is non-empty"
        },
        {
            "flag": "-p",
            "long": "--parents",
            "arg": null,
            "description": "remove DIRECTORY and its ancestors; e.g., 'rmdir -p a/b/c' is similar to 'rmdir a/b/c a/b a'"
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "output a diagnostic for every directory processed --help display this help and exit"
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "output version information and exit"
        }
    ],
    "examples": [],
    "see_also": [],
    "tldr": {
        "source": "official",
        "description": "Remove directories without files.",
        "examples": [
            {
                "description": "Remove specific directories",
                "command": "rmdir {{path/to/directory1 path/to/directory2 ...}}"
            },
            {
                "description": "Remove specific nested directories recursively",
                "command": "rmdir {{-p|--parents}} {{path/to/directory1 path/to/directory2 ...}}"
            },
            {
                "description": "Clean a directory of empty directories",
                "command": "rmdir *"
            }
        ]
    }
}