Q:

How do I remove a directory and all its contents?

In bash all I know is that 
rmdir directoryname

will remove the directory but only if it's empty. Is there a way to force remove subdirectories?

A:

The following command will do it for you. Use caution though.
rm -rf directoryname

A:

if 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.

