Skip to content

Instantly share code, notes, and snippets.

View DevNvll's full-sized avatar

Henrick Mello DevNvll

  • Rio de Janeiro, Brazil
View GitHub Profile
@DevNvll
DevNvll / remove_node_modules_recursively.ps1
Created November 25, 2020 01:28 — 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 -Directory | Remove-Item -Recurse -Force -WhatIf