remove a directory in terminal code example Example 1: delete directory terminal rm -r directory-name Example 2: terminal delete fle rm MyFile.rtf