ls -d -- */ | xargs rm -r
rm -r `ls -d -- */`
In the past, xargs was necessary because there was a limit on command line argument lists. xargs will put a reasonable number on each execution and run the given command multiple times (it also has some cool stuff to help you do concurrent execution). However, in recent kernels, this limitation is gone, so the simpler rm command with no pipe will work fine, though it will use up more RAM so if there are many many thousands of arguments xargs will still be more efficient.
Its worth noting that you do not need
-f for rm, as that is only needed when you want rm to continue when a file does not exist, or to skip any interactive confirmations. Since you have ls telling you they exist, its safer to leave it off, and then the usual
-i alias will save you from accidentally deleting write-protected files and directories.