wipzy

Clear the CocoaPods and Swift Package Manager caches

pod cache clean --all and swift package purge-cache: where CocoaPods, SwiftPM and Carthage keep downloads on a Mac, their size, and what restores them.

The commands pod cache clean --all and swift package purge-cache, and a Pods folder marked Your call with pod install

Two commands clear the two shared caches:

pod cache clean --all
swift package purge-cache

Both are safe: they remove downloads, and the tools fetch them again. Around them are per-project folders, Pods and .build, that are often larger. This guide shows where everything is, how to size it, and what each folder costs to bring back.

Where the files are

Tool Shared, in your home Per project
CocoaPods ~/Library/Caches/CocoaPods, ~/.cocoapods/repos Pods/
Swift Package Manager ~/Library/Caches/org.swift.swiftpm .build/, and for Xcode projects SourcePackages inside DerivedData
Carthage ~/Library/Caches/org.carthage.CarthageKit Carthage/Build/

Size the shared ones in one go:

du -sh ~/Library/Caches/CocoaPods ~/.cocoapods/repos ~/Library/Caches/org.swift.swiftpm ~/Library/Caches/org.carthage.CarthageKit 2>/dev/null

CocoaPods

The download cache

pod cache list
pod cache clean --all

pod cache list prints every cached pod with the path of its copy. pod cache clean --all removes them. Without --all you pass a pod name and CocoaPods asks which version to remove. It refuses to clean everything unless you write the flag, to avoid doing it by mistake.

The spec repos

~/.cocoapods/repos holds the index of all pods. Check what is in it:

pod repo list
du -sh ~/.cocoapods/repos/*

A repo named trunk is the small CDN index that current CocoaPods uses. A repo named master is a full git clone of the old Specs repository, several gigabytes of history. If trunk is there and your Podfile does not name the git source, master is unused:

pod repo remove master

The Pods folder

Pods/ in a project holds the source of every dependency and CocoaPods' own Xcode project. With a Podfile.lock next to it, it can be recreated exactly.

Two commands sound similar and are not: pod deintegrate removes CocoaPods from the Xcode project itself. That is not cleanup. Leave it alone unless you are migrating away.

Swift Package Manager

swift package purge-cache

Run it inside any package folder. It empties the global cache in ~/Library/Caches/org.swift.swiftpm, where SwiftPM keeps bare clones of every repository it has fetched.

Per project, two more commands:

Command What goes
swift package clean Build artifacts in .build
swift package reset The whole .build folder, checkouts included

For Xcode projects the checkouts are not in .build. Xcode keeps them in SourcePackages inside the project's DerivedData folder. File, Packages, Reset Package Caches clears them for the open project, and deleting DerivedData clears them for all.

Carthage

The shared cache is ~/Library/Caches/org.carthage.CarthageKit, and each project has Carthage/Build with the compiled frameworks. carthage bootstrap rebuilds from Cartfile.resolved. Because it compiles every framework, it is the slowest restore of the three.

Cannot be undone

None of these commands uses the Trash. For the shared caches that costs only a download. For Pods/ and Carthage/Build it costs build time. And if you ever edited a file inside Pods/ to test a fix, that edit is gone.

Find the Pods folders of old projects

The shared caches are one number. The Pods folders are one per project, and old projects keep theirs for ever. Replace ~/Code with your projects folder:

find ~/Code -name Pods -type d -prune -exec test -f {}/../Podfile.lock \; -exec du -sh {} + | sort -hr | head -20

Only folders with a Podfile.lock beside them are listed, because the lockfile is what makes pod install give back the same versions. To narrow the list to projects you have not installed into for a month, add -mtime +30 after -prune.

One caution before you remove a Pods folder. Some teams commit it to git, so that a checkout builds without running CocoaPods. Check from inside the project:

git ls-files Pods | head -3

If that prints file names, Pods is part of the repository. Leave it.

And one about the way back: run pod install, not pod update. install restores the versions in Podfile.lock. update ignores the lockfile and moves every pod to the newest version your Podfile allows, which is a different project from the one you cleaned.

With Wipzy

The shared caches are in Wipzy's Dev caches list and the project folders are in Projects. Both are in the free plan.

Row Level How it comes back
CocoaPods cache (~/Library/Caches/CocoaPods, ~/.cocoapods/repos) Safe "pod install fetches them again"
SwiftPM cache Safe "Fetched again when needed"
Carthage cache Safe "Fetched again when needed"
.build in a Swift package Safe swift build
Carthage/Build in a project Safe carthage bootstrap
Pods/ in a project Your call pod install

Pods/ is Your call, not Safe, because of the minutes it costs: the row says "pod install can take minutes". Wipzy offers it only when a Podfile sits next to the folder, and it checks for Podfile.lock. A project you worked on in the last 30 days is never ticked for you.

Everything in the table is moved, not deleted. Clean puts the folders into a quarantine on the same disk, History has Undo, and the space is freed when you press Free now. That also covers the hand-edited file inside Pods/: Undo brings it back.

It is not one click: scan, Review plan, then Clean. See what Safe and Your call mean, or the wider map in where Xcode's space goes.

Questions

Is it safe to run pod cache clean --all?

Yes. It removes downloaded copies of pods from the shared cache. Projects that are already installed keep their Pods folder. The next pod install that needs a pod downloads it again.

Can I delete the Pods folder?

Yes, if the project has a Podfile.lock. pod install recreates the folder with the same versions. Expect it to take minutes on a large project.

What does Reset Package Caches in Xcode do?

It deletes the package checkouts of the open project and fetches every package again. It does not clear the global SwiftPM cache in your Library.

The same job, with a scan, a plan and Undo

Wipzy for Mac. Free for Projects and Dev caches. macOS 13 or later, Apple silicon.

Get Wipzy

The first public build is being notarized by Apple.

The DerivedData folder with its parts Build, Index.noindex and SourcePackages, marked Safe and rebuilt on the next build

Xcode and iOS

How to delete Xcode DerivedData safely

Xcode DerivedData lives in ~/Library/Developer/Xcode/DerivedData. See its size per project, delete it in Terminal or Finder, and know what the next build costs.

, 5 min read

The command simctl delete unavailable above two rows marked Your call: the iOS 26.0.1 runtime at 7.5 GB and an iPhone 16e simulator at 4.2 GB

Xcode and iOS

Delete old iOS simulators and runtimes in Xcode

List every iOS simulator and runtime with xcrun simctl, see which ones are stale, and delete them safely. A single iOS runtime is about 7.5 GB on its own.

, 5 min read