Created
March 9, 2020 16:21
-
-
Save gtfunes/8963d7bf2a7d50536d9772ae7d0fcfd0 to your computer and use it in GitHub Desktop.
Bash script to remove all caches related to a react-native project and reinstall all dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# - Clears app caches, run from project root - | |
echo -e "Removing caches...\n" | |
rm -rf node_modules | |
rm -rf ios/build | |
rm -rf ios/Pods | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* | |
watchman watch-del-all | |
npm cache clean --force && npm cache verify | |
cd ios && pod deintegrate && pod cache clean --all && cd .. | |
echo -e "\nInstalling NPM dependencies...\n" | |
npm i | |
echo -e "\nInstalling Pod dependencies...\n" | |
cd ios && pod install && cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment