How to clear cache in React Native

☕️ 1 min read

iOS

Clear Mac Cache

rm -rf ~/Library/Developer/Xcode/DerivedData/*;

Clear Pods Cache

rm -rf ~/Library/Caches/CocoaPods Pods;

Pods Installation

cd ios; pod deintegrate; pod setup; pod install --verbose;
cd ios; pod install --repo-update;

Android

Clear Gradlew Cache

cd android; ./gradlew clean

Delete cached folders

cd android; rm -rf .gradle; rm -rf .idea; rm -rf build; rm -rf <YouProjectName.iml>

Note: When you run your project again in Android Studio the files you’ll be generated without caches.

References

https://stackoverflow.com/questions/48018988/clean-react-native-project/56941424