Skip to content

Instantly share code, notes, and snippets.

@chnirt
Last active August 23, 2022 07:50
Show Gist options
  • Save chnirt/14ccf296dc4cb54ebe1fbf31d3a977f7 to your computer and use it in GitHub Desktop.
Save chnirt/14ccf296dc4cb54ebe1fbf31d3a977f7 to your computer and use it in GitHub Desktop.
React native clear cache

For Android

npm cache clean --force 
cd android && ./gradlew clean
npm i
npm run android

For iOS

Desktop -> About this Mac -> Storage -> Manage -> Developer -> delete Project Build Data and Indexes

# Delete Archived Applications
rm -r ~/Library/Developer/Xcode/Archives/*/

# Delete Devired Data
rm -r ~/Library/Developer/Xcode/DerivedData/*/

# Delete Apple cached files
rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/

# Delegete cache on com.apple.DeveloperTools
rm -r /private/var/folders/dk/*/C/com.apple.DeveloperTools/*/

# Delete unused simulators
xcrun simctl delete unavailable

# Build with Xcode

For ReactNative

npm run ios --reset-cache                  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment