The -r option remove directories and their contents recursively including all files. The -f option to rm command ignore nonexistent files and arguments, never prompt for anything. There is no undo option. So you have to be very careful with rm -rf command.
How do I delete a directory in Linux without prompt?
The “-rf” flag, along with the “rm” command, removes a directory recursively without prompting the user for confirmation.
How do I delete a folder without prompt?
Remove a file without being prompted
While you can simply unalias the rm alias, a simpler and generally used method to remove files without being prompted is to add the force -f flag to the rm command. It is advisable that you only add the force -f flag if you really know what you are removing.