how to delete an entire directory in linux code example
Example 1: force delete a folder in linux
# To remove non-empty directories and all the files without being prompted, use rm with the -r (recursive) and -f options:
rm -rf dirname
Example 2: how to delete directory in unix
rmdir directoryname // This is will delete an empty directory.
rmdir -r directoryname // This is will delete everything in the directory
// including all files and subdirectories.