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

All files and directories commands · Bash and Linux 5 cheatsheet

Was this page helpful?