Updated ยท Sources & corrections
In this guide
OLLAMA_MODELS for the process that actually runs the Ollama server. Copy the complete existing model directory while the server is stopped, retain the original, restart with the new path and verify the same library before reclaiming space. A variable in your terminal does not necessarily configure a background service or desktop app.This guide covers locating and relocating an Ollama model library, checking an apparently empty library after a move, and importing a standalone GGUF correctly. It does not move a frontend’s chats or document index. If you need the surrounding setup first, use our Ollama complete guide.
1. Confirm the installation and default directory
The official FAQ lists these standard locations and documents OLLAMA_MODELS as the override. Custom services, accounts and containers can differ:
| Installation | Standard model directory |
|---|---|
| Windows desktop app | C:\Users\<username>\.ollama\models |
| macOS app | ~/.ollama/models |
| Standard Linux service | /usr/share/ollama/.ollama/models |
First record the server you use, its installation method, the library path and an exact working model tag. A desktop app, a Linux service, WSL and a container can point to different libraries even on one computer. A path existing on disk does not establish that the current server uses it.
Keep the library as a unit instead of selecting large hash-named files by eye. Do not rename internal files or drop a standalone GGUF into a managed directory and expect it to become a named model. Use the supported import procedure below for that case.
2. Use a copy-and-verify migration
- Record the original directory and the current list of models. Confirm that the destination has room for the copy and will remain available when the server starts.
- Finish downloads and stop the server or quit the app using its normal controls. Copy the complete library to the intended destination; keep the source intact.
- Configure the new path in the server’s launch environment using the relevant platform steps. Do not confuse the destination directory with a parent containing another nested model directory.
- Restart the same server. Compare the model list with your record and try an exact known local model tag.
- Check again after the normal app/service restart cycle. Retain a rollback copy until the new location, access and persistent mount have been verified.
This sequence is an operational checklist, not a captured migration test. A successful listing is useful but is not a full integrity check. If loading fails or the new list is empty, investigate before downloading another copy or deleting the old one.
3. Configure the environment that launches Ollama
Windows desktop app
The Windows model-location instructions cover the app environment. Quit Ollama from its tray menu. In Windows, open the environment-variable settings for your account and create or edit OLLAMA_MODELS with the full destination path, such as D:\OllamaModels. Start Ollama again from the Start menu. A variable changed only in an existing PowerShell session may not reach an already-running app.
Linux with the standard systemd service
The Linux installation documentation covers service customization. Use the documented service override mechanism, rather than editing a package-managed unit directly. In sudo systemctl edit ollama.service, the configuration text is:
[Service]
Environment="OLLAMA_MODELS=/data/ollama-models"
The directory is an example; substitute your verified destination. The service account must be able to access it. Reload the service-manager configuration and restart the service after saving:
sudo systemctl daemon-reload
sudo systemctl restart ollama.service
These steps interrupt the service. Plan them around active work. If your installation uses another launcher or unit, configure that launcher instead. A mounted disk must be available to the service, and access through parent directories matters as well as the final directory. Review ownership and access deliberately; a blanket world-writable permission change is not a migration check.
macOS app and other launchers
The FAQ documents launchctl setenv for the macOS app’s environment. After copying to your actual destination, set the example path below and restart the app:
launchctl setenv OLLAMA_MODELS "/Volumes/AI/OllamaModels"
Confirm the volume name and path first. Homebrew services and custom launchers have their own process environments; do not assume changing the app’s environment configures every other installation. Verify again after the restart or login cycle you normally use.
4. Diagnose an empty library after moving
On a Linux systemd installation, the following read-only commands inspect the unit and recent service messages. Substitute the correct unit if yours differs. See the systemctl reference for unit inspection:
systemctl cat ollama.service
systemctl status ollama.service --no-pager
journalctl -u ollama.service -n 50 --no-pager
| Finding | Next check |
|---|---|
| Old location is still configured | Which launcher starts the server, whether the override was saved and whether that process restarted. |
| Permission error | Service identity, directory access, parent traversal and the filesystem’s access controls. |
| Destination absent after reboot | The mount or external drive availability before service startup. |
| Server works but list differs | The client endpoint, exact destination and whether the complete library was copied. |
| Frontend differs from direct server listing | The frontend’s saved connection; it may reach another Ollama instance. |
Use the installed-model endpoint to inspect a specific local server independently of a frontend. This request is read-only:
curl --fail --show-error --max-time 10 http://127.0.0.1:11434/api/tags
On Windows use curl.exe for the executable. A connection failure is a server/reachability problem, not proof that files were deleted. For container and frontend routes, use our AnythingLLM and Open WebUI connection guide. Keep diagnostic output private if your service configuration contains credentials.
5. Import a standalone GGUF with a separate Modelfile
The official import guide uses a Modelfile to identify the weights. For a supported single-file GGUF in the same working directory, save only this text in a file named Modelfile:
FROM ./my-model.gguf
Then run these commands in the terminal, not inside the Modelfile:
ollama create my-model -f ./Modelfile
ollama list
The filename and model name are examples. Check architecture and file support for your installed version. The earlier edition mixed shell commands into the Modelfile block; these are now separated. Importing weights and relocating an existing library are different operations.
6. Reclaim space after verification
Use Ollama’s documented model-removal command for tags you intentionally no longer need. Our model removal guide covers that decision. Do not assume adding the sizes shown for several tags gives the exact disk space that deletion will recover, and do not manually prune internal files during a migration.
Storage performance depends on the device, connection, cache state and model workload. No universal one-second SSD load time or fixed network-drive delay is established here. Measure your own cold and warm loads separately. Your next step is to verify one known tag using the new library while keeping a recoverable source copy.
Sources and verification scope
AI Models News reviewed the linked official references on 25 October 2026. Paths and commands are illustrative. Configuration syntax and command blocks were checked locally without running a migration, systemd service, import or model. This refresh removes unsupported latency claims, separates Modelfile text from terminal commands and adds service/endpoint diagnosis. Read our editorial policy.