how to remove a dirctory in bash code example Example 1: ubuntu remove directory rm -R folder-name Example 2: remove full dir rm -r mydir