rmdir force remove with files code example Example 1: how to forcefully delete a directory in linux rm -rf dirname Example 2: delete non empty directory cmd rm -rf directoryname