Skip to content

Cleanup Mac for Devs and Dart/Flutter Projects

Published: at 05:00 PM

Delete all node_modules

npx rimraf --glob **/node_modules

Delete build folder of Dart/Flutter projects

find . -name "pubspec.yaml" -execdir sh -c 'if [ -d "build" ]; then echo "Deleting build folder in: $(pwd)"; rm -rf "build"; fi' \; 2>/dev/null

Delete .dart_tool folder of Dart/Flutter projects

find . -name "pubspec.yaml" -execdir sh -c 'if [ -d ".dart_tool" ]; then echo "Deleting .dart_tool folder in: $(pwd)"; rm -rf ".dart_tool"; fi' \; 2>/dev/null

Next Post
How to disable browser context menu for specific widget in Flutter Web