CocoaPods Cache on Mac: Can You Delete It Safely?
Medium riskPackage managers & build toolsUpdated
- Location
~/Library/Caches/CocoaPods
- Risk level
- Medium riskSafe to remove, but the tool that owns it re-downloads or rebuilds it on next use, which costs time and bandwidth. Listed, never pre-selected.
- Selected by default
- No — you choose whether to include it
- What Freshist does
- Moves the selected items to the Trash, so you can undo. Nothing is deleted outright.
- In the app
- Clean → CocoaPods Cache — “Pod cache — next pod install re-downloads.”
From Freshist's own cleaning rules — the same catalog the app uses.
What lives in the CocoaPods cache
When pod install or pod update downloads a pod, CocoaPods stores a copy in its cache before copying it into your project's Pods/ folder. A second project that uses the same pod version installs from that copy instead of the network.
Inside ~/Library/Caches/CocoaPods you'll usually see:
Pods/Release/<name>/<version>-<hash>/: source for tagged releases from the trunk.Pods/External/: pods pulled from git URLs, branches or local paths.Pods/Specs/: the podspec JSON matching each cached pod.
Why it gets big
CocoaPods doesn't expire cached pods. Every version you've installed in every project stays until you remove it. iOS projects that depend on large SDKs (analytics, maps, video, Firebase-style bundles) can leave several hundred megabytes per version, and upgrading a few times a year multiplies that.
There's a second, separate store worth knowing about: ~/.cocoapods/repos. Before CocoaPods 1.8 the default was a full git clone of the master Specs repo, which runs to gigabytes. Many Macs still carry that clone even though the CDN source replaced it. The CDN source keeps its own, much smaller, spec data in ~/.cocoapods/repos/trunk.
What happens if you delete it
| After clearing | Result |
|---|---|
Existing Pods/ in projects | Unchanged; Xcode keeps building |
Next pod install | Downloads any pod not already cached; slower |
Podfile, Podfile.lock | Not touched, so versions stay pinned |
| Offline installs | Fail for pods that aren't cached |
Clearing the cache loses no settings and changes no dependency versions. Podfile.lock still decides which versions get installed.
See what's cached
du -sh ~/Library/Caches/CocoaPods
du -sh ~/.cocoapods/repos 2>/dev/null
pod cache list --short # cached pods, paths relative to the cache root
pod repo list # configured spec sources
pod cache list takes an optional pod name if you only want to see one pod's cached versions.
Clear it with CocoaPods
The CocoaPods command reference documents two forms:
pod cache clean <name> # one pod; asks which version if several are cached
pod cache clean --all # everything, without asking
The --all flag is required when you don't name a pod, which guards against wiping the cache by accident. For the spec repos, use pod repo remove <name> on any source you no longer use.
If pod itself is broken (a Ruby or gem mismatch can stop it from launching), removing ~/Library/Caches/CocoaPods in Finder has the same effect. Quit Xcode first, since it may be building against files from Pods/ at the time.
Keep it or clear it?
Keep the cache if you maintain several apps that share the same pods, or you're about to build without a reliable network. Clear it after dropping CocoaPods for Swift Package Manager, or when an install fails in ways that point to a bad download. Xcode builds leave their own, usually bigger, footprint: see Xcode DerivedData and Xcode device support files.
Sources
Frequently asked questions
Is the Pods folder in my project the same as this cache?
No. Pods/ inside a project is the installed copy Xcode builds against. The cache in ~/Library/Caches/CocoaPods is the shared download store. Deleting the cache leaves Pods/ alone; deleting Pods/ means the next pod install recreates it.
What about ~/.cocoapods/repos?
That folder holds spec repo clones, including the old full clone of the CocoaPods Specs repo if you ever used it. Since CocoaPods 1.8 the CDN is the default source, so an old master clone there is often unused. Remove repos with pod repo remove <name> rather than by hand.
Will clearing the cache fix a pod that won't update?
Sometimes. A corrupt or stale cached download can cause odd install errors. Clearing just that pod with pod cache clean <name> and running pod install again is a common first step.