Skip to content

Swift Playgrounds on a Mac: small app, but every project and package adds up

Swift Playgrounds keeps projects in iCloud Drive and caches builds and packages locally. Where each is, and what to clear after the course is done.

3 min read

Swift Playgrounds is a friendly way to learn Swift and build small apps. Each playground and app project is saved, and builds and downloaded packages are cached. After a course, the leftovers are easy to forget.

du -sh /Applications/Swift\ Playgrounds.app 2>/dev/null
du -sh ~/Library/Mobile\ Documents/*Playgrounds* 2>/dev/null
find ~/Library/Containers -maxdepth 1 -iname '*playgrounds*' -exec du -sh {} + 2>/dev/null

Clearing it

  • Delete projects you no longer need from within the app, so they are removed from iCloud Drive too.
  • With the app quit, its container's cache folders can be cleared; builds are made again when needed.
  • If you moved on to Xcode, the app can be deleted and downloaded again from the App Store.

If you now use Xcode, its much larger caches are in Xcode DerivedData.

Common questions

Where does Swift Playgrounds save projects on a Mac?

In iCloud Drive, in a Playgrounds folder, so they sync with an iPad. Caches are in the app's container in your Library.

Can I delete Swift Playgrounds?

Yes. It is an App Store app. Delete your projects from within it first if you also want them gone from iCloud Drive.

Does Swift Playgrounds use a lot of space?

The app is modest. Projects, cached builds and downloaded packages add up over time.

Read next