System

Swift Package Manager Cache

Swift Package Manager stores downloaded package archives, bare Git repositories, registry metadata, dependency resolution state, and extracted source checkouts under its cache directory so repeated resolves and builds do not have to fetch everything again. On macOS, this cache can accumulate stale repository objects, outdated registry responses, partial downloads, and old package snapshots after interrupted network operations or dependency changes. Kudu removes the disposable contents in ~/Library/Caches/org.swift.swiftpm while leaving your projects, Package.swift manifests, source code, credentials, and Xcode settings untouched.

Why clean Swift Package Manager Cache?

  • A truncated package archive or interrupted Git fetch leaves corrupt cached objects behind, which shows up as repeated dependency resolution failures or checksum and unpack errors until the cache is rebuilt
  • Stale registry metadata can keep SwiftPM pinned to an older package release, so Xcode or swift build keeps resolving the wrong version even after a dependency was updated upstream
  • Old bare-repository data and cached checkouts can confuse branch or tag lookups, causing package updates to appear stuck or missing commits you know exist on the remote
  • Large cached source snapshots, archives, and repository objects steadily consume storage, which users notice as tens of gigabytes disappearing from Library/Caches on machines with many projects
  • After network drops or force-quitting Xcode during package resolution, SwiftPM may reuse partial downloads and fail again on every build with the same fetch or clone error
  • Cached dependency state from previous resolves can make package graph recalculation slower or inconsistent, which shows up as long 'Resolving Package Graph' steps before a clean rebuild fixes it
  • When SQLite-backed metadata inside package-related caches becomes page-fragmented, VACUUM can rewrite the database into a compact file without deleting rows, reducing wasted space and sometimes improving lookup consistency
What gets cleaned

Cache paths Kudu targets

macOS

~/Library/Caches/org.swift.swiftpm
Frequently asked

Common questions about Swift Package Manager Cache

Free & open source

Download Kudu and reclaim your disk space.

Available on Windows, macOS, and Linux. No account required, no feature gates, no telemetry without consent. All cleaning targets are open source and community-auditable.