Tuesday, 22 September 2026 | Updating Daily AI insight, written for builders

Ollama Remove Model: Delete Local LLMs on Any OS

  • To remove a model in Ollama, run ollama rm <model> (for example ollama rm llama3.1:8b). Use ollama list first to get the exact tag.
  • The command deletes the manifest and dereferences the blobs; unreferenced blobs are pruned from the models directory, freeing disk immediately.
  • Model storage lives under ~/.ollama/models on macOS/Linux and %USERPROFILE%.ollamamodels on Windows. Stop the Ollama service before manual cleanup.
  • To remove every model at once, loop ollama rm over ollama list, or delete the models/ directory after stopping Ollama.

The short answer: use ollama rm. Ollama exposes a single, cross-platform CLI for deleting local models, and it works identically on Windows, macOS and Linux. This guide covers the exact command, how to list what you have, where the files live, how to bulk-delete, and how to verify the space was actually reclaimed.

The Command: ollama rm

List installed models first so you use the right tag:

ollama list

Output looks like this:

NAME                    ID              SIZE      MODIFIED
llama3.1:8b             42182419e950    4.7 GB    2 days ago
qwen3:8b                a1b2c3d4e5f6    5.2 GB    1 week ago
gemma3:4b               f6e5d4c3b2a1    3.3 GB    3 weeks ago

Then remove by name and tag:

ollama rm llama3.1:8b

You should see deleted 'llama3.1:8b'. If you omit the tag, Ollama defaults to :latest, which may not match what you actually have installed — always copy the tag from ollama list. The rm command is documented in the official CLI reference on the Ollama GitHub repository.

Removing Multiple Models

ollama rm accepts multiple arguments:

ollama rm llama3.1:8b qwen3:8b gemma3:4b

This is the safest bulk approach because Ollama handles blob dereferencing for you.

Removing All Models at Once

On macOS or Linux (bash/zsh):

ollama list | tail -n +2 | awk '{print $1}' | xargs -r -n1 ollama rm

On Windows PowerShell:

ollama list | Select-Object -Skip 1 | ForEach-Object { ($_ -split 's+')[0] } | ForEach-Object { ollama rm $_ }

If the loop is fussy on your shell version, fall back to deleting them one at a time — the CLI syntax is stable, the piping isn’t.

Where Ollama Stores Models

Knowing the storage layout matters when you want to confirm disk was freed, migrate models to another drive, or clean up after a broken install.

OS Default models directory
macOS ~/.ollama/models
Linux ~/.ollama/models (user install) or /usr/share/ollama/.ollama/models (systemd service install)
Windows %USERPROFILE%.ollamamodels (typically C:Users<you>.ollamamodels)

Inside that directory you’ll see two subfolders: blobs/ holds the raw weight and config chunks (content-addressed by SHA256), and manifests/ holds the small JSON files that map a name like llama3.1:8b to a set of blobs. When you run ollama rm, the manifest is deleted first, then any blob no longer referenced by another manifest is pruned. This is why removing one model that shares layers with another may free less space than you expect.

Ollama’s storage paths are described in the project’s documentation directory on GitHub, including the OLLAMA_MODELS environment variable you can set to relocate the directory.

Platform-Specific Notes

Windows

The CLI is identical: open PowerShell or Command Prompt and run ollama rm <model>. If a model appears to be locked, exit the Ollama tray icon (right-click → Quit Ollama) first — the background service may still hold a handle if you tried a manual folder delete. For a full wipe: quit Ollama from the tray, then delete %USERPROFILE%.ollamamodels. Reinstall instructions live in our Ollama install guide.

macOS

Run ollama rm <model> in Terminal. If you installed the Ollama.app, quit it from the menu bar before manually touching ~/.ollama/models. To uninstall Ollama entirely, drag the app to Trash and delete ~/.ollama.

Linux

For a user install, ollama rm works as expected. For the systemd service install (the default from the curl installer), the models live under the ollama service user, typically /usr/share/ollama/.ollama/models. Run the CLI as the same user that runs the service, or use sudo -u ollama ollama rm <model>. Stop the service before manual filesystem cleanup:

sudo systemctl stop ollama
sudo rm -rf /usr/share/ollama/.ollama/models
sudo systemctl start ollama

Verifying the Space Was Freed

After removing a model, confirm two things:

  1. ollama list no longer shows it.
  2. The models directory shrank. On macOS/Linux: du -sh ~/.ollama/models. On Windows PowerShell: (Get-ChildItem $env:USERPROFILE.ollamamodels -Recurse | Measure-Object -Property Length -Sum).Sum / 1GB.

Rough sanity checks for well-known models (weights only, from the Convly models database, 4-bit quant on disk is close to VRAM footprint):

Model Approx. on-disk size (4-bit)
Gemma 3 4B ~3 GB
Mistral 7B ~4.5 GB
Llama 3.1 8B ~5 GB
Qwen3 8B ~5 GB
Phi-4 ~9 GB
Gemma 3 27B ~16 GB
Qwen3 32B ~20 GB
Llama 3.3 70B ~40 GB

If the freed space looks small, check whether another tag is still installed — for example, if you removed llama3.1:8b but llama3.1:8b-instruct-q4_K_M is still there, they may share blobs. To plan storage before installing a replacement, use the Convly VRAM calculator.

Removing a Model via the REST API

Ollama also exposes a delete endpoint on its local HTTP server (default http://localhost:11434):

curl -X DELETE http://localhost:11434/api/delete -d '{"name": "llama3.1:8b"}'

The endpoint returns HTTP 200 on success and 404 if the model isn’t installed. This is useful for scripting cleanup on remote hosts or CI runners. The API surface is documented in the Ollama docs.

Common Mistakes

  • Deleting files manually while Ollama is running. On Windows especially, this can leave dangling manifests. Always prefer ollama rm, and stop the service before touching the folder.
  • Confusing the tag. ollama rm llama3.1 targets llama3.1:latest. If you pulled llama3.1:8b, that’s a different manifest and won’t be removed.
  • Expecting VRAM to change. Removing a model frees disk, not GPU memory. VRAM is only occupied while a model is loaded; use ollama ps to see what’s currently loaded and ollama stop <model> to unload it.
  • Forgetting custom Modelfile builds. Models you created with ollama create mymodel -f Modelfile show up in ollama list like any other and are removed with ollama rm mymodel.

If you’re rethinking which models to keep, the best local models for Ollama and the LLM leaderboard are useful for choosing replacements by size and capability. If disk pressure is pushing you toward API inference instead, run the numbers with the self-hosting vs API calculator.

Frequently Asked Questions

Does ollama rm free disk space immediately?

Yes. When the last manifest referencing a blob is deleted, Ollama prunes the blob from models/blobs/ on the spot. You can verify with du -sh ~/.ollama/models before and after. If two installed models share layers, only the layers unique to the removed model are freed.

How do I remove all Ollama models at once?

The cleanest way is to stop Ollama and delete the models/ directory under ~/.ollama (or %USERPROFILE%.ollama on Windows). Restart Ollama afterwards and ollama list will be empty. Alternatively, pipe ollama list into xargs ollama rm to remove them one by one through the CLI.

Can I remove a model that’s currently loaded in memory?

Not while it’s actively serving a request. Run ollama ps to see loaded models, ollama stop <model> to unload it, then ollama rm <model>. If a client keeps re-loading it, stop that client first.

Where does Ollama store models on Windows?

Under %USERPROFILE%.ollamamodels, which is normally C:Users<your-username>.ollamamodels. You can relocate this by setting the OLLAMA_MODELS environment variable to a different path — useful when your system drive is small and you want models on a secondary SSD. Restart Ollama for the change to take effect.

Does removing a model in Ollama also remove it from LM Studio or other tools?

No. Ollama, LM Studio, and llama.cpp each maintain their own model directories. Removing llama3.1:8b from Ollama has no effect on a GGUF file you downloaded separately for LM Studio.

Is there a way to remove only old or unused models?

Ollama doesn’t ship a built-in “prune unused” command. The MODIFIED column in ollama list shows the last time a model was pulled or refreshed, not last used, so it’s an imperfect proxy. For a stricter policy, script around ollama list and remove anything above a size threshold or older than a given date.

Reference

Written by Mustafa Ihsan

Mustafa Ihsan is the founder and editor of Convly.ai. He built and maintains the site's live AI models database, its price-performance index, and its free calculators for VRAM requirements, API costs and self-hosting economics. He writes about model pricing, benchmark results and the hardware needed to run AI models locally, and consistently prefers measured numbers to vendor claims.

Scroll to Top