In Linux if we need to remove a directory it can be done using command rmdir dirname But if directory is not empty then system will through an error. rmdir scripts This error comes up: rmdir: failed to remove `scripts’: Directory not empty To remove a directory that is full with other files or directories,