How Do You Delete a Directory and Its Contents in Linux?
Contents How Do I Delete a Directory with Contents in Linux? to Remove a Directory and All Its Contents, Including Any Subdirectories and Files, Use the Rm...
Contents
How do I delete a directory with contents in Linux?
To remove a directory and all its contents, including any subdirectories and files, use the rm command with the recursive option, -r . Directories that are removed with the rmdir command cannot be recovered, nor can directories and their contents removed with the rm -r command.
Must Read
How do I delete a folder and itβs all contents?
Delete a Directory ( rm -r )
To delete (i.e. remove) a directory and all the sub-directories and files that it contains, navigate to its parent directory, and then use the command rm -r followed by the name of the directory you want to delete (e.g. rm -r directory-name ).