Skip to content

Instantly share code, notes, and snippets.

@jetobe95
Forked from jarretmoses/React Native Clear Cache
Created January 17, 2019 18:00
Show Gist options
  • Save jetobe95/07a1812855a6e82fec2f6a7167e0e29f to your computer and use it in GitHub Desktop.
Save jetobe95/07a1812855a6e82fec2f6a7167e0e29f 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 && 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment