node remove recursively fs-extra code example Example: delete dir nodejs fs.rmdirSync(dir, { recursive: true });