Clear a CocoaPods cache for one pod
Inspect and remove the affected pod’s cached download before clearing every cached dependency. Keep Podfile.lock so reinstalling does not change versions unexpectedly.
Inspect and remove the affected pod’s cached download before clearing every cached dependency. Keep Podfile.lock so reinstalling does not change versions unexpectedly.
Try these fixes in order
Identify the pod
Read the first download or checksum failure and record the pod name and version.
Inspect its cache
List cached versions of that pod before removal. Replace ExamplePod with its real name.
pod cache list ExamplePodClear narrowly
Remove that pod’s cached versions, then reinstall from the project directory. The --all option applies to the named pod here.
pod cache clean ExamplePod --allpod installReview the result
If the same download fails, inspect source URL, credentials, and network; compare Podfile.lock after reinstall.
Interpret what you see
One pod download is corrupt
What it suggests: A narrow cache entry may be reused.
Next check: Inspect pod cache list for that pod, then clear its versions and reinstall with Podfile.lock preserved.
Several pods fail to download
What it suggests: A registry, proxy, or network issue is more likely than one corrupt cache.
Next check: Record the first failing URL and verify source access before clearing the entire cache.
The same version fails after cache cleaning
What it suggests: The source artifact or spec may be unavailable.
Next check: Check the podspec source and requested version rather than repeating cache deletion.
Why this happens
- The cached download is stale or corrupt.
- The source repository or network still serves an unavailable artifact.
Still not working?
Use pod cache clean --all only when you intend to clear the entire CocoaPods download cache; it can force substantial downloads.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.