How do I find and delete AI models on a Mac (Hugging Face, Ollama, LM Studio)?

Local AI tools download model weights into hidden folders, such as ~/.cache/huggingface, ~/.ollama/models and ~/.lmstudio/models, and a single model can be several gigabytes.

Shiva ChandraMaker of Clean House · · 4 min read
Short answer

Local AI models live in hidden folders: Hugging Face in ~/.cache/huggingface, Ollama in ~/.ollama/models, LM Studio in ~/.lmstudio/models. List sizes with du, then delete models with each tool's own command: hf cache rm, ollama rm, or LM Studio's My Models tab.

How much space are my AI models using?

These folders are hidden in Finder, so check them from Terminal. The command only reads sizes:

du -sh ~/.cache/huggingface ~/.ollama/models ~/.lmstudio/models 2>/dev/null

A folder that doesn't exist just prints nothing. Model files are large: Hugging Face's own documentation example shows a cache with a 1.9 GB model and a 970 MB one, and larger language models run well past that. The folders never clean themselves, so every model you tried once stays.

How do I check and clear the Hugging Face cache?

Per the Hugging Face docs, the default cache is ~/.cache/huggingface/hub, changeable with the HF_HOME or HF_HUB_CACHE environment variables. It stores one folder per repository (models--org--name), and old revisions are kept when a model updates, so it grows.

The current command-line tool is hf. List first, with sizes and last-used dates:

hf cache ls
hf cache ls --filter "accessed>30d"

Preview a deletion, then run it:

hf cache rm model/bert-base-cased --dry-run
hf cache rm model/bert-base-cased
hf cache prune

hf cache rm asks you to confirm and then permanently deletes the repository from the cache. hf cache prune removes revisions no branch or tag points to and leftover incomplete downloads. Older installs use the previous commands, which still exist in many versions:

huggingface-cli scan-cache
huggingface-cli delete-cache

scan-cache lists what is cached, and delete-cache opens an interactive picker where you select revisions to remove before confirming. If neither command is found, install the tool with pip install -U huggingface_hub.

Deleting from the cache cannot be undone, and these commands skip the Trash. Cached models download again on next use, which can take a long time for big ones. If you saved a fine-tuned model into the cache folder rather than your own folder, copy it out first.

Folder details: Hugging Face cache.

How do I delete Ollama models?

Ollama's FAQ gives ~/.ollama/models as the model folder on a Mac. Use Ollama's commands instead of deleting files, because the folder holds shared blobs and manifests:

ollama list
ollama rm llama3.2

ollama list shows each installed model and its size. ollama rm followed by a name from that list deletes that model. Replace llama3.2 with your own. It is permanent, but ollama pull downloads it again. If a model is loaded in memory, run ollama ps and ollama stop <model> first.

To keep models on an external drive, the FAQ says to set OLLAMA_MODELS; for the macOS app, it gives launchctl setenv OLLAMA_MODELS "<path>" followed by restarting Ollama. See Ollama models for the folder.

How do I delete LM Studio models?

LM Studio keeps models under ~/.lmstudio/models, in publisher and model subfolders (older versions used ~/.cache/lm-studio/models). Open the app and go to the My Models tab, which lists each model with its size and lets you delete one, and change the models directory from the same tab. If you delete by hand in Finder or Terminal, delete a whole model folder, not single files, and quit LM Studio first.

What about Apple Intelligence model storage?

Apple's support page says Macs with M3 or later and at least 12 GB of unified memory need up to 14 GB of on-device storage for Apple Intelligence, other supported Macs need up to 8 GB, and the figure may go higher briefly during software updates. Apple does not document a folder you can clear. According to MacRumors reporting on Apple's statements, turning Apple Intelligence off in System Settings is the way to stop it using that space. You can see a total under System Settings, General, Storage. Don't hunt for files by hand; they sit in protected system locations.

How do I choose which models to delete?

  1. Run the size command at the top and note the biggest folder.
  2. List models with hf cache ls, ollama list or LM Studio's My Models tab.
  3. Delete models you haven't used in months, starting with the largest.
  4. Keep anything you fine-tuned or can't re-download.

How does Clean House handle AI model storage?

Clean House recognizes the Hugging Face model cache as developer data, showing its size and last-used date with a "Why?" card: it re-downloads if a script needs it. It carries a call of Safe to clear, Look first or Keep, and cleaning moves it to the Trash with Recently Cleared as an undo. For Ollama and LM Studio, use the tools' own commands above, since they manage their model files themselves. Peek lets you look inside a folder before you decide.

Docker images are another large store; see Docker disk space on Mac.

Questions

Where does Ollama store models on a Mac?

In ~/.ollama/models. Ollama's FAQ says you can change the location with the OLLAMA_MODELS environment variable. On macOS the app needs it set with launchctl setenv, then a restart.

How do I delete an Ollama model?

Run ollama list to see the names, then ollama rm followed by the model name. The model is removed from disk and is downloaded again if you run it later.

Where is the Hugging Face cache on Mac?

By default in ~/.cache/huggingface/hub. The HF_HOME or HF_HUB_CACHE environment variables change it, according to the Hugging Face docs.

Is it safe to delete the Hugging Face cache?

Yes, it is a download cache, so models come back the next time a script needs them. You lose the download time, and any fine-tuned model saved only in the cache would be gone.

How much space does Apple Intelligence use on a Mac?

Apple says Macs with M3 or later and at least 12 GB of memory need up to 14 GB, and other supported Macs up to 8 GB, for on-device models. Usage can go higher briefly during updates.

Sources

  1. Hugging Face Docs: Understand caching and manage the cache
  2. Ollama Docs: FAQ
  3. LM Studio Docs: Download a model
  4. Apple Support: Apple Intelligence storage requirements
  5. Apple Support: How to free up storage space on your Mac