how to delete any folder in ubuntu code example Example 1: remove folder ubuntu sudo rm -rf folder-name Example 2: remove folder ubuntu $ rm -r directoryName