Skip to content

Tart virtual machines: where ~/.tart grows, and how its automatic pruning really works

Tart keeps pulled images in an OCI cache and local VMs alongside them, each tens of gigabytes. How to measure both, and how to prune without losing a VM.

5 min read

Tart is a popular way to run macOS and Linux virtual machines on Apple silicon, especially for CI. Everything it stores lives in ~/.tart (or wherever TART_HOME points). Tart's own documentation puts a macOS image at roughly 25 to 50 GB, so a handful of them is a large share of a laptop.

What is in it

FolderWhat it holds
~/.tart/vmsLocal VMs you created or cloned. Your working machines
~/.tart/cache/OCIsImages pulled from a registry, kept so the next clone is fast
~/.tart/cache/IPSWsmacOS restore images used to create VMs
tart list
du -sh ~/.tart/vms/* ~/.tart/cache/* 2>/dev/null | sort -h

Automatic pruning, and what it does not cover

When you pull or clone and there is not enough space, Tart removes the least recently used items from its OCI and IPSW caches until the new image fits. By default it caps that at 100 GB per clone, changeable with --prune-limit. Setting TART_NO_AUTO_PRUNE turns it off.

Two things follow. Automatic pruning only touches the caches, never your local VMs, so a stopped VM from last quarter stays until you delete it. And it only runs when space is short, so the cache will happily fill your disk up to that point.

Cleaning by hand

# remove cache entries you have not used recently
tart prune --entries=caches --older-than=7

# delete a local VM you no longer need
tart delete old-vm-name

Run tart prune --help for the options your version supports, since flags have changed between releases.

On a CI runner

A runner that pulls a new image for every Xcode release builds up cache steadily. Schedule a prune, and keep one image per Xcode version you still support. Our guide to CI runner caches covers the rest of a build machine, and virtual machines taking up space covers Parallels, VMware and UTM.

Common questions

Where does Tart store virtual machines?

In ~/.tart, or wherever TART_HOME points. Local VMs are in ~/.tart/vms and pulled images in ~/.tart/cache/OCIs.

Does Tart delete old images automatically?

Only from its caches, and only when a pull or clone needs space. Local VMs are never pruned automatically, so delete them with tart delete.

How big is a Tart macOS VM?

Tart's documentation puts a macOS image at roughly 25 to 50 GB. Several images and VMs can easily reach hundreds of gigabytes.

Read next