delete a directory from command line code example Example 1: remove directory and contents rm -R directory Example 2: terminal delete fle rm MyFile.rtf