Exclude node_modules from spotlight Drop an empty file called .metadata_never_index inside each node_modules directory Spotlight skips any folder that contains that file # Run once find ~/Git -type d -name node_modules -prune -exec touch "{}"/.metadata_never_index \; # Then rebuild Spotlight's index so the change is picked up sudo mdutil -E /