In bash all I know is that
will remove the directory but only if it's empty. Is there a way to force remove subdirectories?
The following command will do it for you. Use caution though.
rm -rf directoryname
rm -rf directoryname fails you, try using
rm -R -f directoryname, or
rm --recursive -f directoryname.
If you are not having any luck with these, you should consider reinstalling rm or switching shells.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?