1--- 2title: Clearing bundler caches on Windows 3--- 4 5> Need to clear development caches on macOS or Linux? [Find the relevant commands here.](clear-cache-macos-linux.mdx) 6 7There are a number of different caches associated with your project that can prevent your project from running as intended. Clearing a cache sometimes can help you work around issues related to stale or corrupt data and is often useful when troubleshooting and debugging. 8 9### Expo CLI and Yarn 10 11``` 12del node_modules &:: With Yarn workspaces, you may need to 13 &:: delete node_modules in each workspace 14yarn cache clean 15yarn 16watchman watch-del-all 17del %localappdata%\Temp\haste-map-* 18del %localappdata%\Temp\metro-cache 19expo start --clear 20``` 21 22### Expo CLI and npm 23 24``` 25del node_modules 26npm cache clean --force 27npm install 28watchman watch-del-all 29del %localappdata%\Temp\haste-map-* 30del %localappdata%\Temp\metro-cache 31expo start --clear 32``` 33 34### React Native CLI and Yarn 35 36``` 37del node_modules &:: With Yarn workspaces, you may need to 38 &:: delete node_modules in each workspace 39yarn cache clean 40yarn 41watchman watch-del-all 42del %localappdata%\Temp\haste-map-* 43del %localappdata%\Temp\metro-cache 44yarn start -- --reset-cache 45``` 46 47### React Native CLI and npm 48 49``` 50del node_modules 51npm cache clean --force 52npm install 53watchman watch-del-all 54del %localappdata%\Temp\haste-map-* 55del %localappdata%\Temp\metro-cache 56npm start -- --reset-cache 57``` 58 59## What these commands are doing 60 61It is a good habit to understand commands you find on the internet before you run them. We explain each command below for Expo CLI, npm, and Yarn, but the corresponding commands React Native CLI have the same behavior. 62 63| Command | Description | 64| --------------------------------- | ------------------------------------------------------------------------------------------------------------ | 65| `del node_modules` | Clear all of the dependencies of your project | 66| `yarn cache clean` | Clear the global Yarn cache | 67| `npm cache clean --force` | Clear the global npm cache | 68| `yarn`/`npm install` | Reinstall all dependencies | 69| `watchman watch-del-all` | Reset the `watchman` file watcher | 70| `del %localappdata%\Temp/<cache>` | Clear the given packager/bundler cache file or directory | 71| `npx expo start --clear` | Restart the development server and instruct the bundlers (for example, webpack, Metro) to clear their caches | 72