How to delete a full directory or folder in Ubuntu Linux?
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.
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.