Remove a directory in the macOS or Linux terminal
How can you delete a folder on macOS or Linux with a terminal command?
Remove folder recursively, force
Remove folder and all contents (also subfolders) and never prompt.
rm -rf testfolder
Remove folder recursively
Remove folder and all contents (also subfolders). Command might prompt before removing.
rm -r testfolder
Remove empty folder
Remove folder if it is empty.
Meaning of the parameters