Home / Guides / Where Ollama Stores Models on Mac, and How to Delete Them
Where Ollama Stores Models on Mac, and How to Delete Them
Before you start
The commands below are provided as-is, without warranty of any kind. Removing a model is permanent: there is no Trash and no undo, so make a backup first (for example with Time Machine). Paths and command names vary by Ollama version and how you installed it. Use at your own risk; Yogi Software Works is not liable for data loss or other damage resulting from these commands. See our Terms.
Ollama keeps every model you download in one hidden folder in your home folder. On a Mac that folder is ~/.ollama/models unless you moved it, and you remove a model with ollama rm rather than by deleting files. This guide shows how to find the folder, see which models take the most space, and delete the ones you no longer use. The manual steps work without any paid software.
Disclosure: I'm the developer of AiKiller (Yogi Software Works), a paid Mac app that can do part of this cleanup. The manual steps below work without it.
This guide is about removing individual models. To remove the Ollama app itself, see How to remove Ollama from Mac.
Step 1: Find the models folder
Ollama's FAQ gives ~/.ollama/models as the model location on macOS, and says the OLLAMA_MODELS environment variable points Ollama at a different directory. For the Mac app, the FAQ says to set environment variables with launchctl setenv. These read-only commands show the default folder and whether the variable is set in your Terminal session or in your login session (blank output means it is not set there):
ls -d "${OLLAMA_MODELS:-$HOME/.ollama/models}"
echo "$OLLAMA_MODELS"
launchctl getenv OLLAMA_MODELS
If you use OLLAMA_MODELS, use that folder in every command below instead of ~/.ollama/models.
What is inside the folder
The FAQ names only the top folder. The layout below comes from Ollama's source code (see server/images.go) and from the way AiKiller reads the same files, and it can change between versions. The folder has two parts:
manifests: small JSON files, one per model and tag, for examplemanifests/registry.ollama.ai/library/<model>/<tag>. Each lists the pieces (layers) that make up that model.blobs: the data itself, in files named after a SHA-256 digest (sha256-...). The large ones are the model weights; others hold items such as the prompt template.
Because the files in blobs are named by digest, you cannot tell which model a file belongs to from its name.
Step 2: List your models and check their sizes
Ollama's own list command (the CLI reference writes it ollama ls; run ollama --help to see the names your version accepts):
ollama list
Ollama's commands talk to the Ollama server, so start the Ollama app first if the command says it cannot connect. To see the size on disk with du (read-only), total first, then the two parts, then the biggest blobs:
du -sh ~/.ollama/models
du -sh ~/.ollama/models/blobs ~/.ollama/models/manifests
du -sh ~/.ollama/models/blobs/* | sort -hr | head
In a test on a macOS virtual machine with placeholder files created in this layout (not real models), du reported 30M and 20M for the two large blobs and 1.0M for each small one, and manifests was 8.0K. Your numbers will differ.
Shared files: why the numbers may not add up
Blobs are named by content, so two models that contain the same piece can point to one file. Adding up the per-model sizes from ollama list may therefore be larger than the folder size from du, and deleting one model may free less than its listed size if another model uses the same file. To see which manifests refer to a given blob, search the manifests for its digest (read-only; replace the placeholder with the real digest, the part after sha256- in the file name):
grep -rl "sha256:<digest>" ~/.ollama/models/manifests
In the same placeholder test, a blob used by two manifests printed both manifest paths, and a blob used by one printed one.
Step 3: Delete a model with ollama rm
Warning: this removes the model from your Mac, and the files cannot be restored from the Trash. A model you pulled from the Ollama library can be downloaded again with ollama pull if it is still available there, which uses your connection and time. A model you created yourself with ollama create (see the import documentation) exists only on your Mac unless you pushed it somewhere, so back up its Modelfile and source files first. Make a backup (for example with Time Machine), and substitute the real name from ollama list for <model>:
ollama rm <model>
Use the name as ollama list prints it, including the tag after the colon, and check ollama list afterwards to see what was removed. The command is documented in the CLI reference. According to Ollama's source code, removing a model deletes its manifest and the blobs that no other model uses; we read this in the source and did not test it with real models.
Then check the result:
ollama list
du -sh ~/.ollama/models
Why not delete the blob files by hand
It is tempting to delete the biggest file in blobs, but this can leave the library in a broken state:
- A manifest still lists the file you deleted. The model then still appears in
ollama listbut may fail to load, and Ollama may need to download the missing piece again. - One file can belong to more than one model, so a file you delete for one model can break another.
- File names are digests, so a wrong guess about which file is which is easy to make, and the deletion is permanent.
If a model is already broken this way, remove it with ollama rm if the command accepts it, then pull it again. If you need to remove the files yourself anyway, quit Ollama, back up the folder, and check every manifest that refers to a file before deleting it (the grep command above). We do not give a manual delete command for blobs here because the right order depends on your Ollama version.
What this guide does not cover
Tested versus taken from documentation. We ran the du, ls and grep commands above on a macOS 15.7.7 virtual machine against placeholder files and folders created in the layout described (no Ollama was installed there, and no real model was used). launchctl getenv was run only on a development Mac with a different variable name, to confirm the command exists. The location, OLLAMA_MODELS, ollama rm and ollama list/ls come from Ollama's documentation, and the folder layout and the effect of ollama rm on shared blobs come from Ollama's source code. We did not run ollama list or ollama rm against real models for this page.
Not covered: removing the app and its other folders (see How to remove Ollama from Mac), models you run through other tools, and Ollama running inside a Docker container, where models may be stored in Docker's disk image instead of ~/.ollama (see Docker.raw is eating my Mac).
Do this in one scan with AiKiller (free)
AiKiller's Local Models screen lists the Ollama models it finds, with their sizes, so you can see them in one place. It reads the manifests under ~/.ollama/models/manifests/registry.ollama.ai/library and checks that default folder only, so a folder moved with OLLAMA_MODELS, or models stored under other registry paths, are not listed. To remove an Ollama model, AiKiller runs ollama rm and then removes the manifest file. Scan Mode is read-only: it lists each item with its path and size. Nothing is deleted until you switch to Clean Mode, select the items you want and type a confirmation code. Deletion is permanent and does not use the Trash, so back up anything you need first. AiKiller is free. Safety Shield (Applications screen only, on by default): when you remove an application, it keeps the credential files AiKiller recognizes, but recognition is limited to AiKiller's built-in detection rules, so other secrets may not be recognized. It does not apply to local model removal, which deletes everything you select.