Skip to content

Instantly share code, notes, and snippets.

@shubham-vunet
Last active February 20, 2021 21:33
Show Gist options
  • Save shubham-vunet/54c99f1adbc96c6b035295f7eda75665 to your computer and use it in GitHub Desktop.
Save shubham-vunet/54c99f1adbc96c6b035295f7eda75665 to your computer and use it in GitHub Desktop.
Clean Disk by removing node_modules, bin and obj directories
// PowerShell
Get-ChildItem .\ -include bin,obj,node_modules -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
// List and Size Linux
find . \( -name "node_modules" -o -name "obj" -o -name "bin" \) -type d -prune | xargs du -chs
// Linux
find . \( -name "node_modules" -o -name "obj" -o -name "bin" \) -type d -prune -print -exec rm -rf '{}' +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment