Skip to content

Instantly share code, notes, and snippets.

@developerfred
Last active September 6, 2021 21:24
Show Gist options
  • Save developerfred/11306a34a9282cda897e4f355f50a56b to your computer and use it in GitHub Desktop.
Save developerfred/11306a34a9282cda897e4f355f50a56b to your computer and use it in GitHub Desktop.
How to Delete ALL node_modules folders on your machine and Free up HD space!

List Files

$ cd development_folder
$ find . -name "node_modules" -type d -prune | xargs du -chs

10G total

Remove All Files

$ cd development_folder
$ find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment