CocoaPods cache on Mac: safe to delete?
Where it is
~/Library/Caches/CocoaPods
What it is
When you run pod install, CocoaPods downloads each pod's source and keeps a copy in its cache so other projects can reuse it without hitting the network. The cache is organized by pod and version, for both released pods and ones pulled from git.
Why it gets so big
Every version of every pod used in any of your projects stays in the cache, and pods that bundle prebuilt binary frameworks can be large.
Is it safe to delete?
Yes. Each project's Pods folder is a separate copy and keeps building. The next pod install for a version that isn't cached downloads it again. CocoaPods' own cache clean command does the same job.
Tip
The specs repos in ~/.cocoapods/repos are separate and can also be large; projects using the CDN source don't need the old full master specs repo at all.
See how much space it uses
du -sh "$HOME/Library/Caches/CocoaPods" 2>/dev/nullClean it with the tool’s own command
pod cache clean --allDelete it by hand
Run in Terminal. Deleting cannot be undone, so check the paths first.
rm -rf "$HOME/Library/Caches/CocoaPods"/*