Skip to content

Lima virtual machines: what lives in ~/.lima, and how to remove instances and images

Lima keeps a disk per instance plus a cache of downloaded images. How to see each instance's real size and remove what you do not use.

4 min read

Lima runs Linux virtual machines on a Mac, and several other tools build on it. Used directly, it keeps each instance in ~/.lima/<name>, with a virtual disk that grows as the machine writes to it, and keeps downloaded operating system images in a cache.

Measure it

limactl list
du -sh ~/.lima/*/ 2>/dev/null | sort -h
du -sh ~/Library/Caches/lima 2>/dev/null

The disk files are sparse, so du shows real usage while Finder may show their maximum size.

Removing instances and images

limactl stop old-instance
limactl delete old-instance

# downloaded images and other cached files
limactl prune

Deleting an instance removes everything inside it, including any containers, databases or files you kept there. Copy out what you need first.

Shrinking an instance you keep

Inside a running instance, delete what you do not need, then trim so the freed blocks are released back to macOS:

limactl shell my-instance sudo fstrim -av

Tools that use Lima

Colima and Rancher Desktop each keep their own Lima instances in their own folders, not in ~/.lima. See Colima and Rancher Desktop, and virtual machines in general.

Common questions

Where does Lima store virtual machines?

Each instance is in ~/.lima followed by its name, with its virtual disk inside. Downloaded images are cached in ~/Library/Caches/lima.

How do I delete a Lima instance?

Stop it with limactl stop and remove it with limactl delete followed by its name. Everything inside the instance is removed with it.

What does limactl prune do?

It removes Lima's cache of downloaded images and other cached files. Instances you have created are not affected.

Read next