Skip to content

Instantly share code, notes, and snippets.

View yadejo's full-sized avatar

Yannick De Jonghe yadejo

  • Realdolmen
  • Waasmunster (Belgium)
View GitHub Profile
@yadejo
yadejo / remove_node_modules_recursively.ps1
Created June 17, 2019 15:02 — forked from SynCap/remove_node_modules_recursively.ps1
Remove `node_modules` folders in Windows in all subfolders recursively with PowerShell to avoid exceeding path max_length
<#
Note: Eliminate `-WhatIf` parameter to get action be actually done
Note: PS with version prior to 4.0 can't delete non-empty folders
#>
Get-ChildItem -Path "." -Include "node_modules" -Recurse -File:$false | Remove-Item -Recurse -Force -WhatIf