Skip to content

Instantly share code, notes, and snippets.

@cleanunicorn
Created March 28, 2023 08:33
Show Gist options
  • Save cleanunicorn/9213e4a4ef4489aa6ec4d189fa8ca9f0 to your computer and use it in GitHub Desktop.
Save cleanunicorn/9213e4a4ef4489aa6ec4d189fa8ca9f0 to your computer and use it in GitHub Desktop.
Remove node_modules for infinite new space
#!/bin/bash
echo "Searching for node_modules directories..."
find . -type d -name "node_modules" -prune -exec echo "Removing {}" \; -exec rm -rf {} \;
echo "All node_modules directories have been removed."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment