ubuntu delete folder command line code example Example 1: how to delete a folder in ubuntu using terminal rm -R folder-name Example 2: sudo rmdir recursive sudo rm -r -f /path/