How to delete a full directory or folder in Ubuntu Linux?
Dung Do Tien Aug 04 2020 789
I want to delete a folder in my server Ubuntu, I want to delete all everything inside in that folder include images, files and subfolders. I tried:
But I get an error:
rmdir: failed to remove `Images': Directory not empty
Please tell me if you have any suggestions.
Have 1 answer(s) found.
Sandeep Kumar Aug 04 2020
I think your command almost correct. You can use the below command :
rm -rf Images
In some case, if you get permission denied message, please run the command below:
sudo rm -rf Images
We have some options to remove a folder as below:
-f= to ignore non-existent files, never prompt.
-r= to remove directories and their contents recursively.
-v= to explain what is being done.
I hope this answer helpful to you.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.