node_modules Syncing
to iCloud?
If you are a developer with Desktop & Documents sync enabled, Apple is uploading every node_modules folder to iCloud. A single project can have 500 MB+ of dependencies. Ten projects? That is 5 GB of pure junk in your iCloud.
Why this happens
When you enable iCloud Desktop & Documents sync, everything in ~/Desktop and ~/Documents gets uploaded — including node_modules, .git directories, build folders, and other dev artifacts. Apple does not have a way to exclude specific folders.
How to fix it
- Delete node_modules from iCloud Drive — Open Finder, navigate to iCloud Drive, and delete all node_modules folders. You can recreate them with
npm install. - Move projects off Desktop — Store your dev projects in ~/Projects or ~/dev instead of Desktop or Documents.
- Turn off Desktop sync — System Settings > Apple ID > iCloud > iCloud Drive > uncheck "Desktop & Documents Folders".
- Add .nosync — Create a
node_modules.nosyncfolder and symlink it, though this is fragile and not recommended long-term.
How much space this frees
In our testing, removing node_modules from iCloud freed 2-8 GB depending on how many projects were on the Desktop. Combined with .git directories and build artifacts, developers often free 10+ GB.
Skip the manual work
iCloud Cleaner does all of this automatically in about 5 minutes. One-time purchase, no subscription.
Buy iCloud Cleaner — $4.99