how to remove director in ubuntu code example Example 1: terminal delete directory not empty rm -rf myDirectory Example 2: remove folder ubuntu $ rm -r directoryName