Developer guide · EN
React Native maintenance commands
Prebuild, cache cleanup, dependency reinstall, Gradle cleanup, and CocoaPods refresh commands.
Generate native projects
npx expo prebuild
npx expo prebuild --platform ios
npx expo prebuild --platform androidPrebuild can regenerate native files. Commit or back up intentional native changes before running destructive regeneration commands.
Clear development caches
watchman watch-del-all
rm -rf $TMPDIR/react-native-packager-cache-*
rm -rf $TMPDIR/metro-cacheReinstall JavaScript dependencies
rm -rf node_modules package-lock.json
npm cache clean --force
npm installClean native projects
cd android && ./gradlew clean && cd ..
cd ios && pod cache clean --all && rm -rf Pods Podfile.lock && pod install && cd ..Review every removal command before running it and execute it only from the intended project directory.