Delete All Files And Folders In Linux

by on July 3, 2009 · 4 comments· LAST UPDATED July 3, 2010


How do I delete all files and folders stored in /home/jerry/movies directories under Linux operating systems?

You need to the rm command.

Open a terminal or shell (bash) prompt and type the following command to delete everything in /home/jerry/movies

cd /home/jerry/movies
rm -rf *

OR you can use the following single command:

rm -rf /home/jerry/movies/

Please note that all folders and files including movies will be deleted. Once deleted you will not able to get back your data. So be careful when typing rm -rf command.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 4 comments… read them below or add one }

1 Udana May 14, 2013 at 10:12 am

~/.local/share/Trash/files# rm -rf *


2 Vivek July 3, 2013 at 5:15 pm

Thanks for the tip about deleting all files from directory. This site always helps me for Linux tips. Thanks again !!


3 Prashanth April 16, 2014 at 5:54 pm

If i want to delete a directory containing files for which i dont have the access

can i delete those files too

If yes can you share me the command


4 pankit October 14, 2014 at 8:36 am

rm -rfv nFolders/


Leave a Comment

Tagged as: , , , , ,

Previous Faq:

Next Faq: