rm folder ubutun code example Example 1: remove folder ubuntu $ rm -r directoryName Example 2: how to delete a folder in ubuntu using terminal rm -R folder-name