fs.rmdirSyncは、引数に指定したパスのフォルダを削除する関数です。
fs.rmdirSync(path[, options])
Register as a new user and use Qiita more conveniently