Skip to content

Instantly share code, notes, and snippets.

@Sadmansamee
Last active October 1, 2018 16:16
Show Gist options
  • Save Sadmansamee/3d20aa9b13319cffa8f28cdc70f38015 to your computer and use it in GitHub Desktop.
Save Sadmansamee/3d20aa9b13319cffa8f28cdc70f38015 to your computer and use it in GitHub Desktop.
React Native clear cache
  1. rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && rm -rf $TMPDIR/haste-* && watchman watch-del-all && npm cache clean --force && npm cache verify && rm -rf ios/build && rm -rf node_modules/ && npm i
  2. watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro* && rm -rf $TMPDIR/haste
  3. rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/metro-* && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && npm i
  4. 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
  5. 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
  6. watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
  7. rm -fr $TMPDIR/react-*
  8. rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean
  9. rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build/ModuleCache/* && rm -rf node_modules/ && npm cache clean && npm i
  10. "start": "node node_modules/react-native/local-cli/cli.js start"
  11. "rc-start": "npm start -- --reset-cache"
  12. "clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean"
  13. "clean-start": "npm run clean && npm run rc-start"
  14. "fresh-install": "rm -rf $TMPDIR/react-* && watchman watch-del-all && rm -rf ios/build/ModuleCache/* && rm -rf node_modules/ && npm cache clean && npm install"
  15. "fresh-start" : "npm run fresh-install && npm run rc-start"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment