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