Skip to content
Go back

Cleanup Mac for Devs and Dart/Flutter Projects

Updated:
Edit page

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

Delete pub cache

rm -rf ~/.pub-cache

Edit page
Share this post on:

Next Post
How to Access Your Flutter App Version the Easy Way (No Packages Required)