command remove a directory code example
Example 1: ubuntu remove directory
rm -R folder-name
Example 2: bash remove directory
rm -rf directory-name
Example 3: remove directory in cmd
# for removing empty directory
$ rmdir myDirectory
# to remove a directory that contains files and subdirectory
$ rm -r myDirectory
Example 4: remove directory command line
Rmdir "C:\myfolder"