Help · Mac storage

How to delete or move Ollama and other local AI models.

To delete an Ollama model, run ollama rm with the model's name in Terminal. To move Ollama models to another drive, quit Ollama, move its models folder, and point the OLLAMA_MODELS setting at the new folder. LM Studio and Hugging Face have their own ways, below. Each model is a few gigabytes, and they pile up as you try new ones.

Lost track of what you've downloaded? Pangalin Space Manager shows each model store on your Mac and spots the same model downloaded twice. The scan is free and changes nothing.

Models can always be downloaded again, so deleting one isn't a disaster. Just a long download if you want it back.

Delete an Ollama model

  1. Open Terminal and run ollama list. It shows each model and its size.
  2. Run ollama rm followed by the exact name from the list, for example ollama rm llama3.1:70b.
  3. Run ollama list again to check it's gone.
ollama list
ollama rm llama3.1:70b

Use Ollama's own command rather than deleting files in ~/.ollama/models, so its index stays correct. Models that share layers only free the part that isn't shared.

Move Ollama models to another drive

Ollama keeps models in ~/.ollama/models. Ollama's FAQ describes moving them with the OLLAMA_MODELS environment variable:

  1. Quit Ollama: click the llama icon in the menu bar and choose Quit Ollama.
  2. Copy the whole models folder from ~/.ollama to the drive, for example to /Volumes/MyDrive/ollama-models. Don't rearrange anything inside it.
  3. Tell the Ollama app where it is. In Terminal, run the line below with your own path, then open Ollama again.
  4. Run ollama list. When your models are listed from the new place, move the old ~/.ollama/models folder to the Trash.
launchctl setenv OLLAMA_MODELS /Volumes/MyDrive/ollama-models

A launchctl setenv setting lasts until you restart your Mac, so run it again after a restart, before you open Ollama. Recent versions of the Ollama app also have a model location setting in its Settings, which stays. If you run ollama serve from Terminal instead of the app, add export OLLAMA_MODELS=/Volumes/MyDrive/ollama-models to ~/.zshrc; a line there only reaches Terminal, not the app.

The drive must be connected whenever you use the models. External SSDs load models much faster than hard drives.

LM Studio

  1. Open LM Studio and go to My Models.
  2. Use the menu (…) on a model to delete it, or reveal it in Finder.

Models live in LM Studio's models folder: ~/.lmstudio/models in current versions, ~/.cache/lm-studio/models in older ones. To keep models on an external drive, change the models folder in My Models, rather than moving the folder in Finder.

Hugging Face

Python tools and apps built on Hugging Face share one cache, usually ~/.cache/huggingface/hub. Its own tool lists and deletes cached models safely:

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

delete-cache shows a checklist; tick what to remove and confirm. Newer versions of the tool are also available as hf; see hf --help.

Moving other models to an external drive

Each tool has an official way to use a different folder, which is better than moving files behind its back:

With Pangalin Space Manager

Pangalin Space Manager's AI Library (AI under For you in the sidebar, or Compare and manage models in Move to External's AI Models group) lists every model your AI apps downloaded, with its app, size and when it was last used. For Ollama it shows how much removing each model would free, and any leftover Ollama data that no installed model uses.

  1. Quit the AI app. A move is refused while an AI app it touches is running.
  2. Tick one or more models and click Move to a drive…. The sheet lists every file, where it lands and the space left on the drive.
  3. Click Move. Each file is copied, checked byte for byte, and only then removed from your Mac.

LM Studio and ComfyUI models move one at a time, with a shortcut left behind. Ollama and Hugging Face share parts between models, so their whole store moves together, and Pangalin Space Manager sets OLLAMA_MODELS or HF_HOME for you, so the Mac app finds them after a restart too. You can bring any model back from the same page. To delete a single Ollama model, use ollama rm as above. Moves count toward your first 5 GB freed free, then $25 a year.

Move Ollama and AI models to an external drive on a Mac, in three steps. 23 seconds, recorded on my own Mac. Captions are in the player's CC menu.

When not to delete this

See every model store in one place.

Pangalin Space Manager's AI Library shows each model store on your Mac (Ollama, LM Studio, Hugging Face and more), finds the same model downloaded twice by different tools (and can merge identical copies without deleting either), and spots leftover Ollama data no installed model uses. It can move models or a whole store to an external drive, checked byte for byte with a shortcut left behind, or move a store to the Trash. To remove a single model, it points you to the tool's own command.

The AI Library's Models tab in Pangalin Space Manager: 6 models, 7.76 GB, grouped by Ollama, LM Studio and Hugging Face, each with its type, when it was last used and its size.

Free scan · The scan changes nothing · First 5 GB freed free, then $25 a year · Notarised by Apple · Apple silicon, macOS 13 or later