delete a folder ubuntu command line code example Example 1: remove folder ubuntu sudo rm -rf folder-name Example 2: remove folder ubuntu rm -f -R folder-name