terminal command to delete file code example Example 1: delete a file in cmd windows del /f filename.type Example 2: terminal delete fle rm MyFile.rtf