remove folder from node by fs code example Example: delete dir nodejs fs.rmdirSync(dir, { recursive: true });