Bash and Linux 5 · Files and directories
Delete a directory
Remove a folder and everything inside it, without prompting.
rm -rf build/
Caution: Deleted files do not go to a trash. Double-check the path, especially with variables or wildcards.
Official Bash and Linux 5 documentation
More files and directories commands
- List files with details
- Create nested directories
- Copy a directory
- Move or rename a file
- Create a symbolic link
- Page through a file
All files and directories commands · Bash and Linux 5 cheatsheet