how to delete a folder using bash code example Example 1: ubuntu remove directory rm -R folder-name Example 2: bash remove directory rm -rf directory-name