In Linux if we need to remove a directory it can be done using command
But if directory is not empty then system will through an error.
This error comes up:
rmdir: failed to remove `scripts’: Directory not empty
To remove a directory that is full with other files or directories, use the below command.
rm -r directory
Running above command would delete the files and directories inside also, but would require a prompt for each of the files. To not receive a prompt use the command below.
rm -rf scripts
This command will remove scripts directory with all containing directories and files