MacDevelopers2 min read

How to find and remove local AI models on a Mac (Ollama, Hugging Face, LM Studio)

Local AI models can each be several gigabytes. Here is where Ollama, Hugging Face and LM Studio store them on a Mac and how to remove the ones you no longer use.

Updated · Written by the spacerecover team

Running AI models locally is great for privacy and experimenting, but each model is large. Try a few sizes and variants of several models, and you can easily have 50 GB or more of weights you have forgotten about.

Each tool keeps its own store, and each has a proper way to remove models. Using it avoids breaking models you want to keep.

Ollama

Ollama stores models in ~/.ollama/models. Model data is split into shared layers ("blobs"), so different models can share pieces. That is why you should remove models through Ollama rather than deleting blob files directly.

See what you have:

ollama list

This lists each model with its size and when it was last modified.

Remove a model:

ollama rm llama3:70b

Replace llama3:70b with the name shown by ollama list. Ollama removes layers no longer used by any remaining model.

Check total size:

du -sh ~/.ollama/models

Hugging Face

Libraries such as transformers and diffusers download models into the Hugging Face cache, by default ~/.cache/huggingface/hub. The Hugging Face command line tool can show and clean this cache:

huggingface-cli scan-cache

This lists each cached model, dataset and revision with its size. To choose what to delete interactively:

huggingface-cli delete-cache

Newer versions of the tool also provide these commands under the hf command; run hf --help to check. If you set a custom location with the HF_HOME or HF_HUB_CACHE environment variables, the cache will be there instead.

LM Studio

Open LM Studio and go to My Models. Each downloaded model is listed with its size. Use the menu next to a model to delete it, or reveal its folder in Finder to check where your models are stored.

Other places models hide

  • Python virtual environments sometimes contain downloaded model files in project folders.
  • Image generation apps often keep checkpoints and LoRAs in their own folders inside ~/Library/Application Support or in a folder you chose during setup.
  • Docker containers running model servers can keep models inside Docker's disk image. See clearing developer caches.

Decide what to keep

Before deleting, consider how long a model took to download, whether you use a specific quantised version, and whether you have customised it (for example an Ollama Modelfile). Downloading a large model again can take a long time on a slower connection.

Frequently asked questions

Where does Ollama store models on a Mac?

In ~/.ollama/models by default, unless you have set the OLLAMA_MODELS environment variable to another location.

Can I delete files in ~/.ollama/models/blobs directly?

It is not recommended. Blobs are shared between models, so deleting them by hand can break models you want to keep. Use ollama rm instead.

Where is the Hugging Face cache on a Mac?

By default in ~/.cache/huggingface/hub. Use the Hugging Face CLI cache scan command to see what is in it.

Want this done for you?

spacerecover lists Ollama and Hugging Face models one by one with their size, explains that they will need to be downloaded again, and recommends removing them through the tool itself so shared layers are never broken.

Sources and further reading

KEEP GOING