rm from node:fs/promises. This is like running rm -rf in JavaScript.
These options configure the deletion behavior:
recursive: true- Delete subdirectories and their contentsforce: true- Don’t throw errors if the directory doesn’t exist
force to get an error if the directory doesn’t exist:
See File I/O for more filesystem operations.