• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Best Free Web Resources — local AI tools and hardware guides

Best Free Web Resources

Local AI Tools & Digital Engineering Resources

What can I run?
  • AI Tools
    • Start: Local LLMs
    • Ollama Models & VRAM
    • LM Studio Models
    • GPU Comparison
    • AI Hardware Matrix
    • Local LLM Directory
    • VRAM Calculator
    • Hardware Compare
    • Local Model Recommender
    • API Pricing & ROI
  • Local AI Guides
  • Web Resources
    • Inspiration
    • Photography
    • Games
    • SEO
    • Tutorial
      • Coding
      • WordPress
    • Resume/CV
    • Graphics
      • Logo
    • Freebies
Cover illustration: Ollama: Delete, Update, Move Models

Ollama Commands: Delete, Update and Move Models (and Free Disk Space)

November 29, 2026 by BFWR Editorial

To delete a model in Ollama, run ollama rm followed by its name, for example ollama rm gemma4. Ollama then deletes the model’s files, but only the ones no other model on your machine still uses, so the space you get back can be smaller than the size ollama list showed. To update a model, run ollama pull on the same name. To move all your models to another drive, point the OLLAMA_MODELS environment variable at the new folder and restart Ollama.

This guide covers the commands for listing, deleting, stopping, copying and updating models, where Ollama keeps them on macOS, Linux and Windows, how to free disk space (including stuck partial downloads), how to move the store, and how to uninstall Ollama completely. BFWR has not run these commands for this guide. They are copied from Ollama’s documentation and checked against its source code on GitHub, read on 15 November 2026, when the latest stable release was v0.40.16 (9 November 2026).

Quick answer

  • Delete: ollama rm gemma4. You can name several models in one command.
  • List what is installed: ollama ls (the same as ollama list).
  • Unload from memory without deleting: ollama stop gemma4. See what is loaded with ollama ps.
  • Update: ollama pull gemma4. Files you already have are reused, and old ones the new version no longer needs are removed.
  • Move the store: set OLLAMA_MODELS to the new folder and restart. On the Mac and Windows apps, check Settings → Model location as well.
  • Default store: ~/.ollama/models on macOS, /usr/share/ollama/.ollama/models for the Linux service, C:\Users\%username%\.ollama\models on Windows.
  • Cloud models (names ending in :cloud) are not downloaded, so deleting one frees no disk space.

The model commands

Every command below comes from Ollama’s CLI reference, except ollama cp, which is not in that page but is defined in the CLI source as “Copy a model”. All of them need the Ollama server (the app, or ollama serve) running.

Task Command What it does
List installed models ollama ls Shows NAME, ID, SIZE and MODIFIED
List running models ollama ps Shows what is loaded in memory and until when
Download or update ollama pull gemma4 Fetches the current version of that tag
Delete ollama rm gemma4 Unloads it if running, then removes it
Unload from memory ollama stop gemma4 Frees RAM or VRAM; the files stay
Copy under a new name ollama cp gemma4 my-gemma Adds a second name for the same files

ollama list and ollama ps

ollama list and ollama ls are the same command; the source registers ls as an alias. Its columns are NAME, ID, SIZE and MODIFIED. If you pass a word after it, such as ollama ls gemma, it only lists models whose names start with that text.

ollama ps lists models that are loaded right now, with the columns NAME, ID, SIZE, PROCESSOR, CONTEXT, RUNNER and UNTIL. The FAQ says “By default models are kept in memory for 5 minutes before being unloaded.”

ollama stop: unload without deleting

If you want the memory back but not the disk space, stop the model instead of removing it:

ollama stop gemma4

In the source, stop sends a request with a keep-alive of zero, which tells the server to unload the model at once. To change how long every model stays loaded, set OLLAMA_KEEP_ALIVE on the server; the FAQ accepts values such as 10m, 24h, a number of seconds, or -1 to keep models loaded.

ollama rm: delete a model

ollama rm gemma4

The command takes one or more names (ollama rm gemma4 qwen3.5 works) and prints deleted 'gemma4' for each. If the model is loaded, rm unloads it first. Use the name exactly as ollama ls shows it, including the tag: gemma4 means gemma4:latest, so it does not remove gemma4:31b.

The same action is available over the local API, as Ollama’s API reference shows it:

curl -X DELETE http://localhost:11434/api/delete -d '{
  "model": "llama3:13b"
}'

ollama pull: update a model

There is no separate update command. Pulling a tag you already have fetches its current manifest. In the source, any layer that already exists on disk is reported as complete without downloading it again, and after the new manifest is written, the old layers it no longer uses are deleted, with the progress message removing unused layers. So updating does not leave the old version behind, unless you set OLLAMA_NOPRUNE.

Updating the Ollama program itself is different. On macOS and Windows, the FAQ says the app downloads updates automatically: you “click on the taskbar or menubar item and then click” the restart-to-update option. On Linux you run the install script again:

curl -fsSL https://ollama.com/install.sh | sh

ollama cp: a second name, no extra space

ollama cp gemma4 my-gemma

In the source, copying reads the source model’s manifest and writes it again under the new name. No model files are duplicated, so a copy costs almost no disk space, and deleting either name leaves the files in place for the other.

Where Ollama stores models

The FAQ gives the default locations:

  • macOS: ~/.ollama/models
  • Linux: /usr/share/ollama/.ollama/models
  • Windows: C:\Users\%username%\.ollama\models
  • Docker: the image’s docs mount a volume at /root/.ollama (-v ollama:/root/.ollama), so models live in the ollama Docker volume.

The Linux path belongs to the ollama service user that the install script creates, with its home at /usr/share/ollama. In the source, the default is simply .ollama/models in the home folder of whoever runs the server. So if you stop the service and run ollama serve as yourself, it uses ~/.ollama/models instead and your models seem to vanish. They have not; they are in the service user’s folder.

Inside the store there are two kinds of files. blobs/ holds the actual data, one file per layer, named after its SHA-256 digest (sha256- followed by 64 hex characters). The weights, the chat template and the parameters are each a layer. manifests/ (and, in newer versions, manifests-v2/) holds small files that map a name such as gemma4:latest to the list of blobs it needs.

Freeing disk space

Why deleting a model may free less than its size

Models can share blobs. A model and its ollama cp copy, for example, point at exactly the same weights file. When you run ollama rm, the server removes the name’s manifest, then checks each of its blobs against every other manifest you have, and deletes only the ones nothing else uses. So ollama rm can report success and free very little; remove every name that uses those files.

Partial downloads that rm cannot see

If you cancel a pull, the half-finished files stay in blobs/ with names ending in -partial, and ollama rm answers that the model is not found, because no manifest exists yet. This was reported in issue #14177. An Ollama collaborator replied: “Restarting the server will run a housecleaning cycle and removed unused blobs.”

The source shows what that cycle does. When the server starts, it deletes blobs that no manifest references and files that are not valid blob names (the code comments name partial downloads as an example), but only ones last modified more than an hour ago. It skips the clean-up if OLLAMA_NOPRUNE is set, and it also skips it, logging corrupt manifests detected, skipping prune operation. Re-pull or delete to clear, if any manifest cannot be read. So the steps are:

  1. Wait until the cancelled download is more than an hour old, or resume it with ollama pull if you still want it.
  2. Restart Ollama: quit and reopen the app on macOS or Windows, or run sudo systemctl restart ollama on Linux.
  3. If space is still missing, look in the server log for the corrupt-manifests warning. Re-pull or delete the model it names.

Moving models to another drive

The FAQ’s instruction is short: “If a different directory needs to be used, set the environment variable” OLLAMA_MODELS to that directory. How you set it depends on how Ollama runs.

macOS (the app)

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

This is the FAQ’s launchctl setenv pattern with your own path. Restart the app afterwards.

Linux (systemd service)

  1. Run sudo systemctl edit ollama.service and add, under [Service]:
    [Service]
    Environment="OLLAMA_MODELS=/mnt/data/ollama-models"
  2. Give the service user access, as the FAQ requires: sudo chown -R ollama:ollama /mnt/data/ollama-models
  3. Reload and restart:
    systemctl daemon-reload
    systemctl restart ollama

Windows

  1. Quit Ollama from the taskbar.
  2. Open Settings (Windows 11) or Control Panel (Windows 10), search for environment variables, and choose Edit environment variables for your account.
  3. Create or edit OLLAMA_MODELS with the new folder, then click OK.
  4. Start Ollama again from the Start menu.

The Windows and Mac apps also have a Model location field in Settings, described as “Location where models are stored.” In open issue #17374, users report that on Windows this app setting overrides OLLAMA_MODELS when the app starts the server; a fix (PR #17401, “app: honor OLLAMA_MODELS over desktop settings path”) is still open. If the variable seems to be ignored, set the same folder in the app. Issue #18921 adds that since v0.40.0, a models folder reached through an NTFS mount point can make ollama list come back empty; use a drive-letter path.

What about the models you already have?

The docs only describe pointing Ollama at a folder; they do not describe moving existing files. Because the server reads everything from blobs/ and the manifest folders under OLLAMA_MODELS, copying the whole models folder to the new location before you restart should carry your models across. That is our reading of the source, not a documented procedure, so keep the old folder until ollama ls shows everything in the new place. Re-pulling is the documented alternative.

Uninstalling Ollama completely

Linux

From Ollama’s Linux page. Stop and remove the service:

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service

Remove the libraries and the binary:

sudo rm -r $(which ollama | tr 'bin' 'lib')
sudo rm $(which ollama)

Remove the downloaded models and the service user and group:

sudo userdel ollama
sudo groupdel ollama
sudo rm -r /usr/share/ollama

If you moved the store with OLLAMA_MODELS, delete that folder as well, and ~/.ollama if you ever ran ollama serve as yourself.

macOS

Ollama’s macOS page lists these commands:

sudo rm -rf /Applications/Ollama.app
sudo rm /usr/local/bin/ollama
rm -rf "~/Library/Application Support/Ollama"
rm -rf "~/Library/Saved Application State/com.electron.ollama.savedState"
rm -rf ~/Library/Caches/com.electron.ollama/
rm -rf ~/Library/Caches/ollama
rm -rf ~/Library/WebKit/com.electron.ollama
rm -rf ~/.ollama

One caution: the two lines with the path in double quotes will not touch your Library folder. The POSIX shell standard expands ~ only when it is unquoted at the start of a word, so the shell looks for a folder literally named ~ instead. Write those two as rm -rf "$HOME/Library/Application Support/Ollama" and rm -rf "$HOME/Library/Saved Application State/com.electron.ollama.savedState". Also check Login Items in System Settings, where the FAQ says Ollama registers itself.

Windows

Ollama’s Windows page says the installer registers an uninstaller under Add or remove programs in Settings. Its note adds that if you changed OLLAMA_MODELS, “the installer will not remove your downloaded models”. The page lists the other folders Ollama uses: %LOCALAPPDATA%\Ollama for logs and downloaded updates, %LOCALAPPDATA%\Programs\Ollama for the program, and %HOMEPATH%\.ollama for models and configuration. Check those after uninstalling and delete what is left.

Docker

Models live in the volume, not the container. Delete one model with the same docker exec pattern the docs use for running models, docker exec -it ollama ollama rm gemma4, or remove the container and then the volume with docker volume rm ollama, which deletes every model in it.

Cloud models and disk space

Models tagged :cloud, such as gemma4:cloud, run on Ollama’s servers. The docs say “Cloud models do not need to be downloaded.” If one appears in ollama ls, the CLI source prints its SIZE as a dash rather than a number, because there are no weights on your disk. Removing it tidies the list but frees nothing. To keep Ollama local-only, the FAQ gives OLLAMA_NO_CLOUD=1, or "disable_ollama_cloud": true in ~/.ollama/server.json.

One security note: Ollama’s API page says “The local API at” http://localhost:11434 “does not require authentication.” Anyone who can reach that port can delete or pull models. The server listens on 127.0.0.1:11434 by default; keep it that way unless you have put authentication in front of it.

FAQ

How do I delete all Ollama models at once?

Pass every name to one command, for example ollama rm gemma4 qwen3.5 llama3.2. Ollama’s CLI has no delete-all flag. Removing the whole models folder also works, but only with the server stopped, and it deletes everything.

Does ollama rm delete the model from memory too?

Yes. In the source, rm first unloads the model if it is running, then deletes it. If you only want the memory back, use ollama stop.

Is there an ollama prune command?

No. The reporter in issue #14177 found that ollama prune is an unknown command, and the current CLI source defines none. The clean-up runs when the server starts, as described above.

Related guides and tools

  • How to run Ollama as a server and in Docker
  • How much RAM and VRAM you need to run local LLMs
  • Quantization guide: Q4_K_M vs Q8_0 vs FP8
  • Best local LLM runners in 2026
  • Ollama models, VRAM and commands
  • GGUF size calculator

Sources

  • Ollama CLI reference
  • Ollama FAQ (model locations, OLLAMA_MODELS, keep-alive, upgrades, cloud features)
  • Ollama on Linux, macOS and Windows (uninstall steps)
  • Ollama Docker image and cloud models
  • Ollama API reference and authentication
  • Source code: cmd/cmd.go, manifest/manifest.go, server/images.go, envconfig/config.go
  • Issues: #14177, #17374, #18921; PR #17401
  • POSIX Shell Command Language, 2.6.1 Tilde Expansion
  • Ollama releases

Updated 15 November 2026. Ollama’s CLI, FAQ, Linux, macOS, Windows, Docker, cloud and API docs, and the source files above on the main branch, were read on that date; the latest stable release was v0.40.16.

⚡ Free Interactive Tools

Work out what your hardware can actually run

Free calculators and directories, sized from real model weights — before you download gigabytes or order a card:

📦 Ollama Models & VRAM Memory cost + pull command 🚀 Start: Local LLMs Hardware, runner and first model 📊 What Can I Run? Models by VRAM tier, 8GB–128GB 💻 Hardware Matrix 75 laptops & GPUs profiled

Filed Under: Technology, Tutorial

About BFWR Editorial

BFWR Editorial is the byline for guides researched and written by Best Free Web Resources. These guides are built from primary sources — model cards, configuration files, official documentation and vendor pricing pages — and every figure is dated and linked so you can check it yourself. Size and memory numbers are arithmetic computed from published model data or from our own calculators, never measurements: BFWR does not operate a hardware test lab and publishes no benchmarks of its own. Where a figure comes from a vendor, we say so.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

⚡ FREE INTERACTIVE TOOLS

Local AI Hardware & VRAM Matrix

Benchmark your PC or Mac for local AI, calculate VRAM requirements, and compare cloud API costs vs local hardware ROI.

🚀 New here? Start with Local LLMs → 💻 Hardware Matrix (79 Devices) → 📚 Local LLM Directory (30 Models) → 🎮 AI GPU Comparison → ⚡ VRAM & KV Cache Calculator → 💰 API Pricing & Break-Even → 🍎 Mac VRAM Unlocker (90% Boost) →
📦 Ollama 🖥️ LM Studio ⚙️ llama.cpp 🚦 vLLM 💬 Open WebUI 🎨 ComfyUI 🔒 Self-Hosted 📊 VRAM Tiers 🎯 Recommender ⚖️ Comparisons

Search

  • Facebook
  • Instagram
  • RSS
  • Twitter
  • YouTube

Footer

Latest Guides

  • Ollama Commands: Delete, Update and Move Models (and Free Disk Space)
  • Android Emulator for WhatsApp on PC: You Probably Do Not Need One
  • Ollama Cloud: Plans, Free Cloud Models and What Leaves Your Machine
  • mlx-lm on a Mac: Install, Run, Serve, and Which Models Fit
  • Viggle Remake and HyperFlow H3 Flash: Running MiniMax H3 Derivatives Locally, and Their Licences
  • herdr: Running Several Coding Agents From One Terminal (With Local Models Too)

AI Tools & Calculators

  • What can I run?
  • VRAM Calculator
  • GGUF Size Calculator
  • Fine-tuning VRAM
  • LoRA Training VRAM
  • Image Generation VRAM
  • Mac VRAM Optimizer

Browse & Compare

  • Models Directory (30 models)
  • Hardware Matrix (79 devices)
  • Image Models
  • Model Licences
  • Comparisons
  • Model Recommender
  • API Pricing & ROI

Guides & Resources

  • Technology
  • Coding
  • Tutorials
  • Freebies
  • Graphics

Copyright © 2026 · Best Free Web Resources · All Rights Reserved.  |  About · Privacy Policy · Contact · AI Tools Hub