Linuxexit code > 0
rm: cannot remove directory: Directory not empty
$rm: cannot remove 'my_folder': Directory not empty
Analysis
You tried to remove a directory using
rmdir or rm without the recursive flag, but it contains files.Common Triggers
- ●Using
rmdiron a populated folder. - ●Using
rmwithout-r.
Debug Checks
- $List contents:
ls -a <folder>.
Resolution
1
Use recursive remove:
rm -rf <folder> (CAREFUL!).Metadata
- Tool
- Linux
- Severity
- High
- Tags
- #linux#filesystem#cleanup