If a subdirectory or a file within the main directory is write-protected, you will be prompted to confirm the deletion.
To force delete a directory containing subdirectories and files without being prompted, you need to use the rm -rf
command followed by the directory name.
rm -rf directory