Recursively deletes the directory, its subdirectories, and all files within them. Example: rm -r old_project Use code with caution. 3. Forcing Deletion: rm -rf
You can remove several empty directories at once: rmdir dir1 dir2 dir3 . how to remove directory in linux
How to remove directory with all of its contents? - Ask Ubuntu Forcing Deletion: rm -rf You can remove several
To avoid accidental deletion of important files, especially when using wildcards, use the interactive option ( -i or -I ). To remove a directory that contains files or
To remove a directory that contains files or subdirectories, you must use the rm (remove) command with the recursive option ( -r or -R ). rm -r directory_name Use code with caution. What this does:
If a directory is write-protected or you want to bypass confirmation prompts for every file, use the force option ( -f ) along with recursive ( -r ). rm -rf directory_name Use code with caution.