The short answer
Yes. Rebuilt or re-downloaded automatically when needed.
What is it?
Swift Package Manager keeps a shared cache in ~/Library/Caches/org.swift.swiftpm: clones of the Git repositories of your package dependencies, downloaded binary artifacts (XCFrameworks) and cached package manifests. Xcode and the swift command both use it, and it grows as you add dependencies to projects.
What happens if you delete it?
Packages are fetched again from their repositories the next time a project resolves its dependencies, which takes time and bandwidth. Your Package.resolved files and project code are not affected.
How to remove it properly
Run swift package purge-cache in Terminal, which empties the shared repository cache with Swift’s own tool, or quit Xcode and move the folder to the Trash. Xcode’s File › Packages › Reset Package Caches only resets the current project’s copies.
Quit the app that uses it, then move it to the Trash. Empty the Trash when you’re sure.
How MoreRoom helps
MoreRoom recognises this item, shows its real size and when it was last used, and labels it “Safe to remove”. In the free version you can move it to the Trash in one click, with Undo; Pro collects every safe item at once.
Frequently asked questions
Is it safe to delete the Swift Package Manager cache?
Yes. Rebuilt or re-downloaded automatically when needed. Packages are fetched again from their repositories the next time a project resolves its dependencies, which takes time and bandwidth. Your Package.resolved files and project code are not affected.
Will Swift Package Manager cache come back after I delete it?
Yes. Packages are fetched again from their repositories the next time a project resolves its dependencies, which takes time and bandwidth. Your Package.resolved files and project code are not affected.
How do I remove Swift Package Manager cache properly?
Run swift package purge-cache in Terminal, which empties the shared repository cache with Swift’s own tool, or quit Xcode and move the folder to the Trash. Xcode’s File › Packages › Reset Package Caches only resets the current project’s copies.