How to Manage Ollama Storage

Updated · MintDisk team

MintDisk Developer Pack listing local AI models with their size

Local language models are big. A single 7B or 8B model is several gigabytes, and trying a few sizes and quantizations of different models can fill a laptop's disk in an afternoon. This guide shows how to manage Ollama storage with Ollama's own commands: where models live on a Mac, how to see what is installed, how to remove what you don't use, and how to keep models on another drive.

Everything here uses Ollama's own commands and documented settings. Deleting files inside Ollama's folder by hand is the one thing this guide asks you not to do, because models share their largest files with each other.

Where Ollama stores models on a Mac

On macOS, Ollama keeps models in your home folder:

~/.ollama/models

Inside are two folders. manifests describes each model and tag; blobs holds the model layers, the large files that make up the weights. Layers are shared: two models built on the same base can point to the same blob, so it is stored only once.

If you set the OLLAMA_MODELS environment variable, Ollama uses that folder instead. To see how much space models take, this command only reads:

du -sh ~/.ollama/models

Don't delete files in blobs by hand. A blob may belong to several models, and deleting it breaks every model that uses it. Use ollama rm, which keeps shared layers that are still in use.

See which models you have

ollama list
Terminal running ollama list, showing three models with their ID, size and last change, then du -sh ~/.ollama/models with the total
ollama list shows each model's size; du shows the total of the models folder. Example output with demo files.

ollama list (or its short form ollama ls) shows every installed model with its name and tag, ID, size and when it was last modified. Models with the same name and different tags, for example llama3.1:8b and llama3.1:70b, are separate downloads.

ollama ps

ollama ps shows which models are loaded in memory right now. That uses RAM, not disk, but stop a model with ollama stop <model> before you remove it. By default Ollama unloads a model after five minutes without use.

Check a model before you remove it

If you are not sure what a model is, ollama show prints its details, such as its parameters, template and license, without changing anything:

ollama show qwen2.5-coder:7b
Terminal running ollama show qwen2.5-coder:7b, listing its architecture, parameters, context length and quantization
ollama show tells you what a model is before you remove it. Example output with demo files.

Models you created yourself with a Modelfile can't be pulled again from the registry. Keep the Modelfile, or don't remove those models, if you might want them later.

Remove models you no longer use

ollama rm llama3.1:70b

ollama rm removes a model's manifest and then deletes only the layers that no other installed model still uses. You can pass several models at once: ollama rm model-a model-b.

Removed models do not go to the Trash. To use a model again, download it again with ollama pull, which can take a while for large models and counts against metered connections.

A good routine is to keep one or two models you use daily, and remove experiments once you have decided against them. Comparing ollama list before and after shows how much space each removal freed.

Choose smaller variants

Many models in the Ollama library come in several sizes, published as tags such as :7b, :14b or :70b. The size you see in ollama list is roughly the disk space a model needs, and larger variants also need more memory to run.

Before you pull a large variant, check whether a smaller one is enough for your task. Keeping one mid-sized model you use instead of three large ones you tried is often the biggest saving.

To compare what the folder uses with what the models report, run du -sh ~/.ollama/models/blobs and add up the sizes in ollama list. Shared layers mean the folder can be smaller than the sum.

A simple monthly routine

  1. Run ollama list and look at the Modified column: models you pulled long ago and never updated are often the ones you stopped using.
  2. For each model you are unsure about, ask whether you could pull it again if you need it. Registry models can be; your own Modelfile builds can't without the Modelfile.
  3. Remove the ones you don't need with ollama rm, several at once if you like.
  4. Run du -sh ~/.ollama/models again to see what you got back.

Keep models on another drive

If you want to keep a larger collection, put it on an external SSD by pointing OLLAMA_MODELS to a folder there. Ollama's documentation explains that when Ollama runs as the macOS app, environment variables are set with launchctl, and the app must be restarted afterwards:

launchctl setenv OLLAMA_MODELS "/Volumes/ExternalSSD/ollama-models"

Then quit Ollama from the menu bar and open it again. Models you pull from then on go to the new folder. Before you switch, remove the models you no longer want with ollama rm: after the switch, Ollama no longer looks in ~/.ollama/models, so models left there only take space until you pull them again in the new folder and delete the old one.

The drive has to be connected whenever Ollama runs, and a slow drive makes loading a model slower.

Other places local models hide

If you use more than one local AI tool, Ollama may not be the only large folder. Each tool keeps its own copy of a model, even if it is the same model:

  • Hugging Face models downloaded by Python libraries live in ~/.cache/huggingface/hub by default. Run hf cache ls to list them and hf cache rm <repo> to delete one.
  • Other desktop apps for local models keep their own model folders; check each app's settings for the location and its own delete option.

Use du -sh on each folder to see where the space really goes before you start removing models.

Questions and answers

Does ollama rm delete layers that other models use?

No. Ollama deletes a layer only when no remaining model refers to it. That is also why removing one of two related models can free less space than its listed size.

Does Ollama clean up unused files by itself?

Ollama's server removes unused model blobs when it starts, unless the OLLAMA_NOPRUNE environment variable is set.

Is it safe to delete the whole ~/.ollama folder?

It removes every model at once, together with anything else Ollama keeps in that folder. Quit Ollama first, and only do it if you want to start over; otherwise remove models one by one with ollama rm.

Does stopping Ollama free disk space?

No. ollama stop and quitting the app free memory, not disk. Models stay on disk until you remove them with ollama rm.

How much free space do I need to pull a model?

At least the model's size as shown in the library or in ollama list after download, plus some room for the rest of your work. Check before you pull a large variant on an almost full disk.

Can I see how much space one model uses on disk?

ollama list shows each model's size. Because layers are shared, removing a model can free less than that number; compare du -sh ~/.ollama/models before and after to see the real effect.

See every local model, with size and last use

MintDisk's Developer Pack lists your Ollama models, and models in your Hugging Face cache, with their size and when you last used them, so unused ones are easy to spot. Removing an Ollama model deletes it permanently, like ollama rm, and keeps layers that other models still share.

MintDisk Developer Pack listing local Ollama and Hugging Face models with their size and last use
MintDisk's Developer Pack lists local AI models with their size and when they were last used.

Related

Sources

First published . Commands and menu paths were checked against the sources above on the update date.

Ask AI assistants about MintDisk

Independent, real-time insights from major language models.