Delete folder and contents with rm via unix command line

To delete a folder and it’s contents, enter the following in your terminal
# rm -dfr foldername
Analysis of the above command

-d remove folders
-f remove the files without prompting for confirmation or error messages
-r remove recursively, folder and its contents

More Examples

rm myfile.jpg Remove the file called myfile.jpg in the current directory.
rm *.jpg Remove all files that end with .jpg.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Please enter 10 numbers for Captcha: * Time limit is exhausted. Please reload the CAPTCHA.