Peakiq Blog
17 December 2025

Run the following commands in your project’s root directory:
watchman watch-del-all
rm -rf yarn.lock package-lock.json node_modules
rm -rf android/app/build
rm -rf ios/Pods ios/Podfile.lock
rm -rf ~/Library/Developer/Xcode/DerivedData
npm install && cd ios && pod update && cd ..
npm start -- --reset-cache
Or run everything in one line:
watchman watch-del-all && rm -rf yarn.lock package-lock.json node_modules && rm -rf android/app/build && rm -rf ios/Pods ios/Podfile.lock && rm -rf ~/Library/Developer/Xcode/DerivedData && npm install && cd ios && pod update && cd .. && npm start -- --reset-cache
If you're using Yarn, run:
watchman watch-del-all
rm -rf yarn.lock package-lock.json node_modules
rm -rf android/app/build
rm -rf ios/Pods ios/Podfile.lock
rm -rf ~/Library/Developer/Xcode/DerivedData
yarn install && cd ios && pod update && cd ..
yarn start -- --reset-cache
Or execute everything in a single command:
watchman watch-del-all && rm -rf yarn.lock package-lock.json node_modules && rm -rf android/app/build && rm -rf ios/Pods ios/Podfile.lock && rm -rf ~/Library/Developer/Xcode/DerivedData && yarn install && cd ios && pod update && cd .. && yarn start -- --reset-cache
If you're developing for iOS, clearing the build cache can help resolve many issues.
If your Android emulator is acting up, you might need to reset it:
If your Android build is not working correctly, clearing the Gradle cache can help:
cd android && ./gradlew clean
To ensure a full clean:
cd android && ./gradlew cleanBuildCache
If you frequently clean your React Native projects, setting up an alias in your terminal profile can save time.
Run one of the following commands based on your shell:
For zsh (Mac default):
open ~/.zprofile
For bash:
open ~/.bash_profile
Inside the file, add this alias:
alias cleanstart="watchman watch-del-all && killall -9 node && rm -rf yarn.lock package-lock.json node_modules ios/Pods ios/Podfile.lock android/app/build && npm install && cd ios && pod update && cd .. && npm start -- --reset-cache"
Save the file and run:
source ~/.zprofile # If using zsh
source ~/.bash_profile # If using bash
Now, you can simply run:
cleanstart
This will fully clean your React Native project in one command! 🎯
Regularly cleaning your React Native project can help you:
By following these steps, you’ll have a fresh and optimized React Native development environment. 🚀