Where Does CocoaPods Store Repos and Caches?
CocoaPods keeps spec repos in ~/.cocoapods and downloaded pods in ~/Library/Caches. Cache commands and the CP_HOME_DIR override.
Last updated
CocoaPods spreads state across three spots. The ~/.cocoapods folder holds spec repositories and your config.yaml. Downloaded pod sources cache under ~/Library/Caches/CocoaPods. Each project then vendors its own Pods directory with a Podfile.lock pinning exact versions.
Permission errors after a sudo pod install almost always mean root-owned files in the first two folders. Delete them with sudo rm and rerun as yourself. Set CP_HOME_DIR to relocate repos and caches together, and inspect the cache any time with pod cache list.
Where CocoaPods stores this, by platform
~/.cocoapods
Spec repos plus config.yaml. Pod downloads cache in ~/Library/Caches/CocoaPods. Both move together under CP_HOME_DIR. Projects keep their own Pods folder beside the Podfile.
Frequently asked questions
How do I clear the CocoaPods cache?
Run pod cache clean with an optional pod name, or wipe ~/Library/Caches/CocoaPods by hand. Follow with pod install to refetch. Use pod cache list first to see what is actually cached.
CocoaPods throws permission errors, what broke?
A past sudo run left root-owned files in ~/.cocoapods or the Caches folder. Remove both with sudo rm -fr and rerun without sudo. Never run pod install as root again unless the project demands it.
Notice an outdated path? Let us know.