Bottom Line: It is 100% safe to clear the CocoaPods cache. Running pod cache clean --all will not delete your Xcode project code or Podfile.
What is the CocoaPods Cache Folder?
Located at ~/Library/Caches/CocoaPods on macOS, this directory is created by CocoaPods (the dependency manager for Swift and Objective-C iOS/Mac apps).
When you run pod install or pod update, CocoaPods downloads cloned git repositories and framework zip archives into this local cache. Over time, as iOS project dependencies update, old pod tarballs accumulate, taking up 5 GB to 20 GB+ on Mac SSDs.
Can You Delete CocoaPods Cache?
✅ Yes, it is safe to clear.
- No app code lost: Your
.xcodeproj,.xcworkspace, andPodfileremain untouched in your project directories. - Auto-download on demand: Running
pod installin the future will simply re-fetch active pods from GitHub.
How to Safely Clean Up CocoaPods Cache
Method 1: Using the CocoaPods CLI (Recommended)
Open Mac Terminal and run:
pod cache clean --all
Method 2: Manual Cache Deletion
To wipe the CocoaPods cache folder manually:
rm -rf ~/Library/Caches/CocoaPods
Related Guides
- Learn about deleting Xcode DerivedData.
- How to clean up macOS ~/Library/Caches.
- Check if you can clean MobileSync Backups.
Discussion
Loading authentication...