rimraf delete empty folder recursive code example Example: delete dir nodejs fs.rmdirSync(dir, { recursive: true });