Skip to content

Instantly share code, notes, and snippets.

@g0rdan
Last active March 15, 2024 08:27
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save g0rdan/be489f8cdde1992687942719b0a94a57 to your computer and use it in GitHub Desktop.
Save g0rdan/be489f8cdde1992687942719b0a94a57 to your computer and use it in GitHub Desktop.
Ultimate Flutter cleaning
#!/bin/bash
echo "flutter clean ..."
flutter clean
echo "Deleting .flutter-plugins ..."
rm -rf .flutter-plugins
echo "Deleting .packages ..."
rm -rf .packages
echo "Deleting .symlinks ..."
rm -rf ios/.symlinks/
echo "Deleting build/ ..."
rm -rf build/
echo "Deleting ios/Pods ..."
rm -rf ios/Pods
echo "Deleting ios/Podfile* ..."
rm ios/Podfile*
echo "Deleting .pub-cache ..."
rm -rf "${HOME}/.pub-cache/"
echo "Deleting pubspec.lock ..."
rm pubspec.lock
echo "Deleting ios/Runner.xcodeproj/project.xcworkspace ..."
rm -rf ios/Runner.xcodeproj/project.xcworkspace
echo "Deleting Library/Caches/CocoaPods ..."
rm -rf "${HOME}/Library/Caches/CocoaPods"
echo "Deleting DerivedData ..."
rm -rf "~/Library/Developer/Xcode/DerivedData"
echo "Running flutter packages get ..."
flutter packages get
echo "Done."
@arzola
Copy link

arzola commented Oct 12, 2023

nice

@cofirazak
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment