delete a folder ubunt code example Example 1: ubuntu remove directory rm -R folder-name Example 2: how to forcefully delete a directory in linux rm -rf dirname