xxxxxxxxxx
# WITH NPM:
watchman watch-del-all && rm -rf node_modules && npm install && npm start --reset-cache && rm -rf /tmp/metro-*
# WITH YARN:
watchman watch-del-all && rm -rf node_modules && yarn install && yarn start --reset-cache && rm -rf /tmp/metro-*
xxxxxxxxxx
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
xxxxxxxxxx
Remove all the local archives :
yarn cache clean
Remove all the archives stored in the ~/.yarn directory :
yarn cache clean --mirror