linux rmdir recursive code example Example 1: remove full dir rm -r mydir Example 2: sudo rmdir recursive sudo rm -r -f /path/