how to remove directory with files in it code example Example 1: remove directory and contents rm -R directory Example 2: remove full dir rm -r mydir