To reset the cache for a single package:
- Navigate to
~/Library/Caches/org.swift.swiftpm/repositories
and deleting the folder and lock file related to the package - Then, in Xcode, run
File-->Swift Packages-->Reset Package Caches
You can also try the solution recommended here to reset the entire cache (thanks @Bao Lei):
- https://stackoverflow.com/a/72838880/1099193