DeleteFile["file"]
deletes a file.
DeleteFile[{"file1","file2",…}]
deletes a list of files.


DeleteFile
DeleteFile["file"]
deletes a file.
DeleteFile[{"file1","file2",…}]
deletes a list of files.
Details

- DeleteFile returns Null if it succeeds in deleting files, and $Failed if it fails.
- File["path"] may be used to specify a file name.
- DeleteFile also works with cloud objects.
Examples
open all close allBasic Examples (1)
Scope (2)
Properties & Relations (2)
Alternatively, use Remove on the persistent symbol:
Tech Notes
Related Guides
History
Introduced in 1991 (2.0) | Updated in 2016 (11.0)
Text
Wolfram Research (1991), DeleteFile, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteFile.html (updated 2016).
CMS
Wolfram Language. 1991. "DeleteFile." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/DeleteFile.html.
APA
Wolfram Language. (1991). DeleteFile. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeleteFile.html
BibTeX
@misc{reference.wolfram_2025_deletefile, author="Wolfram Research", title="{DeleteFile}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/DeleteFile.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_deletefile, organization={Wolfram Research}, title={DeleteFile}, year={2016}, url={https://reference.wolfram.com/language/ref/DeleteFile.html}, note=[Accessed: 08-August-2025]}