Clear CocoaPods and Swift Package Manager caches

Both download every dependency version into a shared cache that only grows.

Measure

 Terminal
du -sh ~/Library/Caches/CocoaPods ~/Library/Caches/org.swift.swiftpm ~/Library/org.swift.swiftpm 2>/dev/null

CocoaPods

 Terminal
pod cache list
pod cache clean --all

Swift Package Manager

In Xcode: File → Packages → Reset Package Caches. The shared cache folders above can also be deleted while Xcode is closed.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free beta for Mac.

Download for Mac