github.com/artpar/rclone@v1.67.3/docs/content/commands/rclone_rmdirs.md (about)

     1  ---
     2  title: "rclone rmdirs"
     3  description: "Remove empty directories under the path."
     4  slug: rclone_rmdirs
     5  url: /commands/rclone_rmdirs/
     6  groups: Important
     7  versionIntroduced: v1.35
     8  # autogenerated - DO NOT EDIT, instead edit the source code in cmd/rmdirs/ and as part of making a release run "make commanddocs"
     9  ---
    10  # rclone rmdirs
    11  
    12  Remove empty directories under the path.
    13  
    14  ## Synopsis
    15  
    16  
    17  This recursively removes any empty directories (including directories
    18  that only contain empty directories), that it finds under the path.
    19  The root path itself will also be removed if it is empty, unless
    20  you supply the `--leave-root` flag.
    21  
    22  Use command [rmdir](/commands/rclone_rmdir/) to delete just the empty
    23  directory given by path, not recurse.
    24  
    25  This is useful for tidying up remotes that rclone has left a lot of
    26  empty directories in. For example the [delete](/commands/rclone_delete/)
    27  command will delete files but leave the directory structure (unless
    28  used with option `--rmdirs`).
    29  
    30  This will delete `--checkers` directories concurrently so
    31  if you have thousands of empty directories consider increasing this number.
    32  
    33  To delete a path and any objects in it, use the [purge](/commands/rclone_purge/)
    34  command.
    35  
    36  
    37  ```
    38  rclone rmdirs remote:path [flags]
    39  ```
    40  
    41  ## Options
    42  
    43  ```
    44    -h, --help         help for rmdirs
    45        --leave-root   Do not remove root directory if empty
    46  ```
    47  
    48  
    49  ## Important Options
    50  
    51  Important flags useful for most commands.
    52  
    53  ```
    54    -n, --dry-run         Do a trial run with no permanent changes
    55    -i, --interactive     Enable interactive mode
    56    -v, --verbose count   Print lots more stuff (repeat for more)
    57  ```
    58  
    59  See the [global flags page](/flags/) for global options not listed here.
    60  
    61  # SEE ALSO
    62  
    63  * [rclone](/commands/rclone/)	 - Show help for rclone commands, flags and backends.
    64