Ollama models are big. One 27B model is 18 GB, a coding MoE is 23 GB, and after a few weeks of testing new releases it is easy to have 100-200 GB of models sitting in a hidden folder. This guide shows how to delete Ollama models one at a time or all at once (including in PowerShell), how to find and clean the models folder on Windows, macOS and Linux, how to free VRAM without deleting anything, and how to fully uninstall Ollama so nothing is left behind, including Docker installs and moved model folders.
- Delete one model:
ollama rm qwen3.8:27b(check names withollama list). - Delete all models (PowerShell):
ollama list | Select-Object -Skip 1 | ForEach-Object { ollama rm ($_ -split '\s+')[0] } - Delete all models (macOS/Linux):
ollama list | awk 'NR>1 {print $1}' | xargs -n1 ollama rm - Free VRAM only:
ollama stop <model>. This unloads it from memory but keeps the file. - Models folder: Windows
C:\Users\<you>\.ollama\models, macOS~/.ollama/models, Linux service/usr/share/ollama/.ollama/models, or whereverOLLAMA_MODELSpoints. - Full uninstall on Windows: uninstall from Settings → Apps, then delete
%USERPROFILE%\.ollama,%LOCALAPPDATA%\Ollamaand any customOLLAMA_MODELSfolder. The uninstaller does not delete moved models.
Step 1: See Which Models You Have
Open a terminal (PowerShell or Command Prompt on Windows, Terminal on macOS and Linux) and run:
ollama list
You get a table like this:
NAME ID SIZE MODIFIED
qwen3.8:27b a1b2c3d4e5f6 18 GB 3 days ago
mimo-v2.6:9b 0f9e8d7c6b5a 6.6 GB 20 hours ago
gemma4:12b 9a8b7c6d5e4f 8.0 GB 2 weeks ago
nomic-embed-text:latest 0a1b2c3d4e5f 274 MB 1 month ago
The NAME column, including the part after the colon, is what you pass to ollama rm. If a model has no tag shown, Ollama treats it as :latest. The ollama ls alias does the same thing.
The list only shows models on the server you are talking to. If you set OLLAMA_HOST to another machine or a Docker container, you are listing that machine’s models.
Delete One Ollama Model
ollama rm qwen3.8:27b
Ollama prints deleted 'qwen3.8:27b'. That removes the model’s manifest and every data file (blob) that no other model still uses. You can pass several names at once:
ollama rm gemma4:12b mimo-v2.6:9b llama3.2:latest
Things to know:
- The tag matters.
ollama rm gemma4meansgemma4:latest. If you pulledgemma4:31b, you must write that tag, or you get “model not found”. - Custom models are separate. If you made
mimo-coderfrom a Modelfile, deletingmimo-v2.6:9bdoes not delete the big weights whilemimo-coderstill points to them. Delete both to get the space back. - There is no undo and no recycle bin. You will have to
ollama pullagain to get it back. - If the model is loaded and answering, run
ollama stop <model>first, then delete it.
Delete All Ollama Models at Once
There is no built-in “delete all” command, but one line does it. On macOS and Linux:
ollama list | awk 'NR>1 {print $1}' | xargs -n1 ollama rm
NR>1 skips the header line, $1 is the NAME column, and xargs -n1 runs ollama rm once per model.
To delete everything except the models you want to keep, filter them out first:
ollama list | awk 'NR>1 {print $1}' | grep -v -E '^(qwen3.8:27b|nomic-embed-text:latest)$' | xargs -n1 ollama rm
To delete every tag of one family (for example every Qwen 2.5 build you have):
ollama list | awk 'NR>1 {print $1}' | grep '^qwen2.5' | xargs -n1 ollama rm
Want to see what would be deleted first? Drop the last part and just run ollama list | awk 'NR>1 {print $1}'.
Delete Ollama Models in PowerShell (Windows)
Remove one model: the command is the same as everywhere else.
ollama rm qwen3.8:27b
Remove all models in PowerShell:
ollama list | Select-Object -Skip 1 | ForEach-Object { ollama rm ($_ -split '\s+')[0] }
Remove all except some:
$keep = @('qwen3.8:27b','nomic-embed-text:latest')
ollama list | Select-Object -Skip 1 | ForEach-Object { ($_ -split '\s+')[0] } |
Where-Object { $_ -and ($keep -notcontains $_) } | ForEach-Object { ollama rm $_ }
Remove all models that match a name:
ollama list | Select-Object -Skip 1 | ForEach-Object { ($_ -split '\s+')[0] } |
Where-Object { $_ -like 'deepseek-r1*' } | ForEach-Object { ollama rm $_ }
Command Prompt (cmd.exe) version:
for /f "skip=1 tokens=1" %m in ('ollama list') do ollama rm %m
(Use %%m instead of %m inside a .bat file.)
If PowerShell says ollama : The term 'ollama' is not recognized, the Ollama folder is not on your PATH. Open a new terminal after installing, or run it by full path: & "$env:LOCALAPPDATA\Programs\Ollama\ollama.exe" list.
ollama stop vs ollama rm: Free VRAM Without Deleting
A lot of people search for “delete model” when they really want their VRAM back so ComfyUI or a game can use it. You do not need to delete anything for that.
| Command | Frees VRAM/RAM | Frees disk | Model still available |
|---|---|---|---|
ollama stop qwen3.8:27b |
Yes, immediately | No | Yes |
ollama rm qwen3.8:27b |
Yes | Yes | No, must pull again |
| Quit Ollama from the tray | Yes, all models | No | Yes |
Check what is loaded with ollama ps. By default Ollama keeps a model in memory for 5 minutes after the last request. To change that, set OLLAMA_KEEP_ALIVE (for example 0 to unload right after each reply, or 30m), or pass "keep_alive": 0 in an API call. This is the trick I use when I switch from a local LLM to a big Wan 2.2 video render in ComfyUI on the same GPU.
Where Ollama Stores Models on Each OS
| System | Default models folder |
|---|---|
| Windows | C:\Users\<you>\.ollama\models (open it with explorer %USERPROFILE%\.ollama\models) |
| macOS | ~/.ollama/models |
| Linux (installed as a service) | /usr/share/ollama/.ollama/models |
Linux (running ollama serve as your user) |
~/.ollama/models |
| Docker | /root/.ollama/models inside the container (usually a named volume called ollama) |
Any OS with OLLAMA_MODELS set |
The folder in that variable |
Inside you will find two folders:
manifests/registry.ollama.ai/library/<model>/<tag>: small text files that list which blobs make up each model.blobs/: the actual weights, namedsha256-<hash>. One model is usually one big blob plus a few small ones (template, licence, parameters, vision projector).
To check how much space models use: on Windows run "{0:N1} GB" -f ((Get-ChildItem "$env:USERPROFILE\.ollama\models" -Recurse | Measure-Object Length -Sum).Sum / 1GB) in PowerShell; on macOS/Linux run du -sh ~/.ollama/models (or the service path with sudo).
Do not delete single blobs by hand while you still use Ollama. Blobs are shared between models, and removing the wrong one breaks other models with “file does not exist” errors. Use ollama rm, or delete the whole models folder when you want to start again from zero.

Why the Folder Is Still Big After Deleting
- Shared blobs: a blob is only deleted when no remaining model uses it. If
mimo-coderwas built frommimo-v2.6:9b, the weights stay until both are gone. - Half-finished downloads: a cancelled
ollama pullleaves partial files inblobs. Ollama prunes unused blobs when the server starts, so quit Ollama completely and start it again. (If someone setOLLAMA_NOPRUNE=1, pruning is switched off; remove that variable.) - Two models folders: if you once moved models with
OLLAMA_MODELS, the old folder in.ollama\modelsmay still hold the original copies. Delete the folder that Ollama is no longer using. - Another app’s copies: LM Studio, Jan and ComfyUI keep their own model files. Deleting from Ollama does not touch them. For ComfyUI folders see my ComfyUI model folders cheat sheet.
Move Models to Another Drive Instead of Deleting
If the problem is a small C: drive rather than too many models, move them:
- Quit Ollama from the system tray (or
sudo systemctl stop ollamaon Linux). - Move the whole
modelsfolder, for example toD:\ollama\models. - Set a user environment variable
OLLAMA_MODELS=D:\ollama\models(Windows: Settings → System → About → Advanced system settings → Environment Variables). On Linux addEnvironment="OLLAMA_MODELS=/data/ollama/models"withsudo systemctl edit ollamaand give theollamauser access withsudo chown -R ollama:ollama /data/ollama/models. - Start Ollama again and run
ollama list. Your models should all be there.
Recent versions of the Ollama Windows and Mac app also have a model location setting in the app’s Settings window that does the same thing.
Fully Uninstall Ollama on Windows
- Quit Ollama: right-click the llama icon in the system tray and choose Quit. Check Task Manager for any
ollama.exeorollama app.exeleft and end them. - Uninstall the app: Settings → Apps → Installed apps → Ollama → Uninstall. (If you installed it with winget,
winget uninstall Ollama.Ollamadoes the same.) - Delete your models and keys: remove
C:\Users\<you>\.ollama. This holds themodelsfolder and your Ollama key pair. - Delete logs and update files: remove
%LOCALAPPDATA%\Ollama(it holdsapp.log,server.logand downloaded updates). - Delete leftover program files: if
%LOCALAPPDATA%\Programs\Ollamastill exists, delete it. If you installed to a custom folder with/DIR=, delete that folder. - Delete moved models: if you set
OLLAMA_MODELS, delete that folder too. The official docs say the uninstaller does not remove models you moved. - Remove environment variables: in Environment Variables, delete
OLLAMA_MODELS,OLLAMA_HOST,OLLAMA_KEEP_ALIVEand any otherOLLAMA_*entries. - Standalone zip or NSSM service: if you ran the zip version as a service, run
nssm remove ollama confirm(or whatever you named it) in an admin terminal before deleting its folder.
The same steps in PowerShell, after uninstalling from Settings:
Remove-Item -Recurse -Force "$env:USERPROFILE\.ollama"
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Ollama" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Programs\Ollama" -ErrorAction SilentlyContinue
[Environment]::SetEnvironmentVariable('OLLAMA_MODELS', $null, 'User')
Fully Uninstall Ollama on macOS
- Quit Ollama from the menu bar.
- Delete the app and the CLI link:
sudo rm -rf /Applications/Ollama.app sudo rm -f /usr/local/bin/ollama - Delete models, settings, caches and saved state:
rm -rf ~/.ollama rm -rf ~/Library/Application\ Support/Ollama rm -rf ~/Library/Saved\ Application\ State/com.electron.ollama.savedState rm -rf ~/Library/Caches/com.electron.ollama ~/Library/Caches/ollama rm -rf ~/Library/WebKit/com.electron.ollama - If you installed with Homebrew instead:
brew services stop ollama, thenbrew uninstall ollama(orbrew uninstall --cask ollamafor the app), then delete~/.ollama.
These are the files and folders listed in Ollama’s own macOS docs. ~/.ollama is the big one, because it holds the models.
Fully Uninstall Ollama on Linux
For the standard curl -fsSL https://ollama.com/install.sh | sh install, the official steps are:
sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service
sudo rm -r $(which ollama | tr 'bin' 'lib')
sudo rm $(which ollama)
sudo userdel ollama
sudo groupdel ollama
sudo rm -r /usr/share/ollama
What each part does: stop and disable the service, remove the service file, remove the bundled GPU libraries in /usr/local/lib/ollama, remove the binary, then remove the ollama user, group and home folder (which is where the models live). Also check:
~/.ollamain your own home folder, if you ever ranollama serveas yourself./etc/systemd/system/ollama.service.d/, if you added overrides withsystemctl edit. Then runsudo systemctl daemon-reload.- Your custom
OLLAMA_MODELSfolder, if you moved models.
Remove Ollama in Docker
Delete a model inside a running container:
docker exec -it ollama ollama rm qwen3.8:27b
Remove the container, its model volume and the image:
docker rm -f ollama
docker volume rm ollama
docker image rm ollama/ollama
If you used a bind mount (for example -v ~/ollama:/root/.ollama) instead of a named volume, delete that host folder. With Docker Compose, docker compose down -v removes the volumes defined in the file. Open WebUI’s own volume (chat history, users) is separate; only delete it if you want to lose your chats.
Delete Models From the Ollama App and Open WebUI
- Ollama desktop app: the chat app can download models from its model picker, but deleting is still done with
ollama rmin a terminal. - Open WebUI: Admin Panel → Settings → Models (or Connections → Ollama → Manage). Pick the model and click the delete icon. It calls the same Ollama delete API.
- API:
curl -X DELETE http://localhost:11434/api/delete -d '{"model": "qwen3.8:27b"}'. Useful in scripts.
More commands like these are in my Ollama commands cheat sheet.
Errors When Deleting Models
Error: model 'gemma4' not found: you left out the tag. Copy the exact name fromollama list.could not connect to ollama app, is it running?:ollama rmtalks to the server. Start the Ollama app orollama serve, then try again.- Access denied when deleting the folder on Windows: Ollama is still running. Quit it from the tray and end leftover processes in Task Manager.
- Permission denied on Linux: the service folder belongs to the
ollamauser. Usesudofor folder operations, but runollama rmas normal. - Model “comes back” after deleting: you are deleting from one server and listing another (check
OLLAMA_HOST), or an app such as Open WebUI or an agent is pulling it again automatically.
Frequently Asked Questions
How do I delete a model in Ollama?
Run ollama list to see the exact name, then ollama rm followed by the name and tag, for example ollama rm qwen3.8:27b.
How do I remove an Ollama model in PowerShell?
Use the same ollama rm command. To remove every model in PowerShell, run: ollama list | Select-Object -Skip 1 | ForEach-Object { ollama rm ($_ -split ‘\s+’)[0] }
How do I delete all Ollama models at once?
On macOS or Linux run ollama list | awk ‘NR>1 {print $1}’ | xargs -n1 ollama rm. On Windows use the PowerShell loop above. You can also quit Ollama and delete the whole models folder.
Where are Ollama models stored on Windows?
In C:\Users\your-name\.ollama\models, unless you set the OLLAMA_MODELS environment variable to another folder.
Does uninstalling Ollama delete the models?
Not always. On Windows the uninstaller does not remove models you moved with OLLAMA_MODELS, and the .ollama folder in your user profile may remain. Delete it by hand to get the space back.
How do I fully uninstall Ollama on Linux?
Stop and disable the ollama service, delete /etc/systemd/system/ollama.service, the binary and its lib folder, then remove the ollama user and group and the /usr/share/ollama folder, which holds the models.
What is the difference between ollama stop and ollama rm?
ollama stop unloads a model from VRAM and RAM but keeps it on disk. ollama rm deletes it from disk, so you have to pull it again to use it.
Final Thoughts
For day-to-day cleanup, ollama list plus ollama rm is all you need, and the one-line loops above clear everything in seconds. If space is the real problem, move the models folder to a bigger drive with OLLAMA_MODELS rather than deleting models you will download again next week. And when you want Ollama gone for good, remember the three places it hides: the app itself, the .ollama folder and any custom models folder.
Clearing space for something new? See the best Ollama models by VRAM for what is worth downloading in 2026, or reinstall cleanly with my Ollama install guide. Thinking of switching tools? Read Ollama vs LM Studio vs llama.cpp first.



