How Remove All Files from a Directory in Ubuntu?
Contents How Do I Delete All Files in a Folder? to Remove a Directory and All Its Contents, Including Any Subdirectories and Files, Use the Rm Command with the...
Contents
How do I delete all files in a folder?
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 remove all files from a directory in terminal?
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 ).