how to delete entire folder in linu code example Example 1: remove directory and contents rm -R directory Example 2: remove directory linux rm -rf /path/to/directory/*