DeleteContents
is an option for DeleteDirectory that specifies whether the contents of directories should automatically be deleted.
Details

- With the default setting DeleteContents->False, DeleteDirectory will only delete directories that contain no files.
Examples
Basic Examples (1)
List of files in the directory:
The contents of the directory cannot be deleted:

Use DeleteContents->True to automatically delete the contents:
Wolfram Research (1991), DeleteContents, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteContents.html.
Text
Wolfram Research (1991), DeleteContents, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteContents.html.
CMS
Wolfram Language. 1991. "DeleteContents." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DeleteContents.html.
APA
Wolfram Language. (1991). DeleteContents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeleteContents.html