Find all directories with the name ending in ".tmp" in the current directory and its subdirectories up to 4 levels deep, randomly sort them, and delete them.
find ~ -maxdepth 4 -noleaf -type d -name "*.tmp" -print0 | sort -R | xargs -0 rm -rf