Whether you’re troubleshooting a broken install, switching to a different setup, or just freeing up disk space, uninstalling Ollama is slightly more involved than most applications. The binary and the service are one thing — the model files (which can be tens or hundreds of gigabytes) are stored separately and don’t get removed by a standard uninstall. This guide covers how to remove everything cleanly on Windows, macOS, and Linux, and how to do a partial cleanup if you just want to reclaim disk space without removing Ollama itself.
Understanding What Ollama Installs
Ollama consists of a few distinct pieces, each in a different location. Knowing what they are makes cleanup easier:
The binary / application — the main Ollama executable and any bundled libraries (including CUDA runtime). Location varies by platform.
The systemd service (Linux) or LaunchAgent (macOS) — the background process that starts Ollama automatically.
Model files — the large GGUF model files you’ve downloaded. These live in the models directory and take up the most space.
Configuration and manifests — small files tracking which models are installed, their metadata, and any custom Modelfiles you’ve created.
A complete uninstall removes all four. If you’re reinstalling or troubleshooting, you might only need to remove the binary and service while keeping your models.
Uninstalling on Windows
Ollama on Windows installs as a standard application with an uninstaller. The quickest method:
- Right-click the Ollama icon in the system tray → Quit (stop the running service first)
- Open Settings → Apps → Installed apps
- Search for “Ollama”, click the three-dot menu → Uninstall
- Follow the uninstaller prompts
This removes the Ollama binary and the Windows service registration. However, it does not remove your model files or configuration data.
To remove model files and configuration after uninstalling, delete the .ollama directory from your user profile:
# In PowerShell
Remove-Item -Recurse -Force "$env:USERPROFILE.ollama"
Or navigate to C:UsersYourName in File Explorer, enable hidden files (View → Show → Hidden items), and delete the .ollama folder. This folder typically contains the bulk of Ollama’s disk usage — all your downloaded models live here unless you’ve set a custom OLLAMA_MODELS path.
If you set a custom OLLAMA_MODELS path, delete that directory too. Also remove the environment variables you set: go back to System Properties → Environment Variables and delete any OLLAMA_* variables you added.
Uninstalling on macOS
First quit the Ollama app from the menu bar (click the icon → Quit Ollama), then move it to the trash:
# Quit any running Ollama processes
pkill ollama
# Remove the application
rm -rf /Applications/Ollama.app
# Remove the CLI tool
sudo rm /usr/local/bin/ollama
Then remove model files and configuration:
# Models and config (the big one — can be many GB)
rm -rf ~/.ollama
# Remove LaunchAgent if it exists
rm -f ~/Library/LaunchAgents/com.ollama.ollama.plist
launchctl remove com.ollama.ollama 2>/dev/null || true
If you created a custom LaunchAgent for environment variables (as described in the environment variables guide), remove that too:
launchctl unload ~/Library/LaunchAgents/com.ollama.environment.plist 2>/dev/null || true
rm -f ~/Library/LaunchAgents/com.ollama.environment.plist
If you installed via Homebrew:
brew services stop ollama
brew uninstall ollama
rm -rf ~/.ollama
Uninstalling on Linux
On Linux with a standard Ollama installation (via the install script), there’s no package manager entry to remove — the script installs a binary directly. Remove it manually:
# Stop and disable the systemd service
sudo systemctl stop ollama
sudo systemctl disable ollama
# Remove the service file
sudo rm /etc/systemd/system/ollama.service
sudo systemctl daemon-reload
# Remove the binary
sudo rm /usr/local/bin/ollama
# Remove the ollama user and group (if you want a complete clean)
sudo userdel ollama
sudo groupdel ollama
Then remove model files. The default location for the system service is /usr/share/ollama:
sudo rm -rf /usr/share/ollama
If you set a custom OLLAMA_MODELS path in the systemd override, remove that directory too. Also clean up the systemd override file:
sudo rm -rf /etc/systemd/system/ollama.service.d/
sudo systemctl daemon-reload
Figure 1 — What Ollama Installs and Where to Find It
Partial Cleanup: Removing Models Without Uninstalling Ollama
The most common reason to do a cleanup isn’t to remove Ollama entirely — it’s to reclaim disk space consumed by model files. You can do this without uninstalling Ollama at all.
List what you have:
ollama list
This shows all downloaded models with their size. Remove ones you no longer need:
ollama rm llama3.1:8b
ollama rm mistral
ollama rm codellama:34b
Each removal frees the disk space that model was using. After removing several large models, verify the space was actually reclaimed:
# Check the models directory size
du -sh ~/.ollama/models # macOS / Linux
du -sh /usr/share/ollama/.ollama/models # Linux (system install)
On Windows, check the size of C:UsersYourName.ollamamodels in File Explorer.
If you want to nuke all models at once without removing Ollama itself, you can delete the models directory contents directly — but using ollama rm for each model is cleaner because it updates Ollama’s internal registry correctly. If you delete files manually, Ollama’s model list may become inconsistent until you restart the service.
Reinstalling After a Complete Uninstall
If you’re uninstalling to do a fresh install — perhaps to fix a corrupted installation or update to a new major version — the reinstall process is the same as the original install:
Windows: Download the installer from ollama.com and run it. The installer creates a fresh installation without any leftover state from the previous install, as long as you’ve removed the .ollama directory.
macOS: Download the .dmg from ollama.com, open it, drag to Applications, and launch. The first-run setup is identical to a new installation.
Linux:
curl -fsSL https://ollama.com/install.sh | sh
The install script creates a new ollama user and service. If you previously deleted the ollama user, the script recreates it cleanly.
After reinstalling, if you want to restore your models, simply re-pull them — there’s no way to restore deleted model files other than downloading them again. This is worth factoring in if you have models with slow download speeds on limited bandwidth.
Checking Disk Usage Before Deciding
Before doing a full uninstall, it’s worth checking exactly how much space Ollama and its models are actually using:
# macOS / Linux: check total .ollama directory
du -sh ~/.ollama
du -sh ~/.ollama/models
# Per-model breakdown
du -sh ~/.ollama/models/blobs/* | sort -h
# Linux (system install)
du -sh /usr/share/ollama
This often reveals that the bulk of the space is in a handful of large models that you rarely use — removing just those might free enough space without needing a full uninstall. A 70B model in Q4 takes about 43GB; a 7B model takes 4–5GB. If you’re running low on disk space, removing unused large models is almost always the right move before a full uninstall.
Figure 2 — Uninstall Checklist by Platform
Verifying the Uninstall Is Complete
After completing the steps above, verify nothing is left behind:
# Confirm the binary is gone
which ollama # should return nothing
ollama --version # should return "command not found"
# macOS / Linux: confirm service is gone
systemctl status ollama # Linux: should say "not found"
# Confirm model directory is gone
ls ~/.ollama # should return "No such file or directory"
On Windows, check Task Manager to confirm no Ollama processes are running, and check the Program Files and AppData directories to confirm no Ollama folders remain. Also check Services (search in Start menu) to confirm the Ollama service is no longer listed — the uninstaller should have removed it, but it’s worth checking if you’re doing a clean-slate reinstall.
A complete Ollama uninstall on any platform should free several hundred megabytes for the binary and libraries, plus whatever you had in downloaded models — which for most users is the significant part. If you have a mix of 7B and 13B models across several different model families, you’re likely looking at 20–50GB or more freed by removing the model directory. Check du -sh ~/.ollama before starting to know what you’re working with.
Changing the Port or Base URL Without Uninstalling
If the reason you’re considering an uninstall is that you want Ollama on a different port or base URL, you don’t need to uninstall — just change the OLLAMA_HOST environment variable. Set it to 127.0.0.1:11435 (or any other port you prefer) using the method for your platform in the environment variables guide, restart Ollama, and it will listen on the new port. Any tools pointing at the old port will need their configuration updated, but Ollama itself doesn’t need to be reinstalled. Similarly, if you want to change the models directory, set OLLAMA_MODELS to the new path and restart — the existing models at the old path remain there until you move them manually or delete them, and new model pulls go to the new location. These configuration changes are reversible and don’t require touching the Ollama binary or service setup.
Keeping Models When Reinstalling
If you’re doing a reinstall specifically to fix a broken Ollama installation, you can preserve your downloaded models rather than re-downloading everything. On Linux, move the models directory to a temporary location before uninstalling, then point the new installation at it: set OLLAMA_MODELS in the systemd override to the path where you moved the models before restarting. Ollama reads the model files from wherever OLLAMA_MODELS points — as long as the files are intact and in the expected directory structure (a manifests subdirectory and a blobs subdirectory), it will recognise them correctly. On macOS and Windows, move the models subdirectory from ~/.ollama/models (or wherever you had it) to a safe location, complete the uninstall and reinstall, then move it back or set OLLAMA_MODELS to point to where you stored it. You’ll save significant download time on a slow connection if you have several large models. Just confirm the models work correctly after pointing Ollama at them by running ollama list and then a quick inference test on each one.
Removing Ollama from Docker
If you’ve been running Ollama in a Docker container rather than as a native install, the cleanup process is different. Stop and remove the container, then remove the image and any volumes:
# Stop and remove the container
docker stop ollama
docker rm ollama
# Remove the Ollama image
docker rmi ollama/ollama
# Remove the named volume (contains models - this frees the disk space)
docker volume rm ollama
# Or list all volumes first to confirm which one to delete
docker volume ls
The Docker volume is where models are stored in a containerised setup — it’s the equivalent of ~/.ollama/models in a native install. Removing it frees the model storage. If you mounted a host directory as the models volume (-v /path/on/host:/root/.ollama), delete that host directory instead. Docker makes cleanup straightforward — docker rm and docker volume rm are all you need for a complete removal of a containerised Ollama setup.