How would you delete a directory in Linux?
There are two commands that can be used to delete a directory in Linux.
rmdir
$ rmdir <directory name>
rm -rf
$ rm -rf <directory name>
Note: The command rm -rf should be used carefully because it will delete all the data without any warnings.