Skip to content

Instantly share code, notes, and snippets.

@yeomann
Forked from jarretmoses/React Native Clear Cache
Last active July 4, 2018 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yeomann/e2c7c71a25b67d737e7da525aa058b54 to your computer and use it in GitHub Desktop.
Save yeomann/e2c7c71a25b67d737e7da525aa058b54 to your computer and use it in GitHub Desktop.
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean --force && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@yeomann
Copy link
Author

yeomann commented Jul 4, 2018

added --force in RN >= 0.50

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