OD OllamaDoctor
STORAGE GUIDE · WINDOWS 10 & 11

How to Move Ollama Models to Another Drive on Windows

By Systems Engineering Team Updated: October 30, 2026 Storage Optimization NTFS Junctions Read Time: 8 min

By default, Ollama downloads all GGUF neural weights into your primary Windows system partition at C:\Users\<YourUsername>\.ollama\models. Once you download three or four modern models (such as Llama 3.1 8B, Qwen 2.5 14B, and DeepSeek R1), you can easily fill 40–80 GB of space on your main OS drive. Here is how to relocate your entire model library to a secondary SSD safely without losing your existing models or custom Modelfiles.

Method 1: The Recommended Way (Using OLLAMA_MODELS)

The cleanest and officially supported method is setting the OLLAMA_MODELS Windows environment variable. This tells the Ollama service daemon exactly where to look for manifests and tensor blobs.

Step 1: Fully Quit Ollama from System Tray

Before moving any files, ensure that Ollama is not actively locking blob files in memory. Look at your Windows taskbar system tray (bottom-right next to the clock), right-click the white llama icon, and select Quit Ollama.

You can also verify termination in PowerShell:

Stop-Process -Name ollama* -Force -ErrorAction SilentlyContinue

Step 2: Create the Destination Directory

Create a dedicated folder on your target drive (e.g. D:\OllamaModels or E:\AI\models). Run in PowerShell:

New-Item -ItemType Directory -Path "D:\OllamaModels" -Force

Step 3: Transfer Existing Models

Copy your existing manifests\ and blobs\ folders to the new location. Using PowerShell's robust Copy-Item:

Copy-Item -Path "$env:USERPROFILE\.ollama\models\*" -Destination "D:\OllamaModels" -Recurse -Force
Fast Transfer Tip: If copying 50+ GB via File Explorer feels sluggish, use Windows' native multithreaded robocopy tool in PowerShell:
robocopy "$env:USERPROFILE\.ollama\models" "D:\OllamaModels" /E /MT:16 /MOVE
The /MOVE flag moves the files and immediately frees up space on your C: drive.

Step 4: Set the Persistent Environment Variable

To ensure Ollama remembers this new path across Windows reboots, set the user-level environment variable:

[Environment]::SetEnvironmentVariable('OLLAMA_MODELS', 'D:\OllamaModels', 'User')

Step 5: Restart Ollama and Verify

Relaunch Ollama from the Windows Start Menu, open a fresh PowerShell window, and run:

ollama list

All your previously downloaded models should appear instantly with their tags and sizes intact.

Method 2: The Transparent NTFS Directory Junction

If you use containerized tooling or third-party wrappers that hardcode ~/.ollama/models, you can create a transparent NTFS directory junction (symbolic link). Windows will redirect all filesystem reads and writes to your D: drive behind the scenes.

  1. Quit Ollama completely.
  2. Move the models folder from C:\Users\<User>\.ollama\models to D:\OllamaModels.
  3. Open PowerShell or CMD as Administrator and create the junction:
    cmd /c mklink /J "$env:USERPROFILE\.ollama\models" "D:\OllamaModels"

Performance Impact: NVMe vs SATA SSD vs HDD

Does storing models on a secondary drive slow down inference?

Frequently Asked Questions

Can I store models on a network drive (NAS / SMB share)?

Technically yes, by pointing OLLAMA_MODELS to a mapped drive (e.g., Z:\OllamaModels) or UNC path (\\NAS\Models). However, network latency and gigabit ethernet limits (125 MB/s) will increase initial loading times significantly.

How do I revert back to the default C: drive location?

Simply delete the environment variable: [Environment]::SetEnvironmentVariable('OLLAMA_MODELS', $null, 'User') and move your models folder back to C:\Users\<YourUsername>\.ollama\models.

Will future model downloads automatically go to the new drive?

Yes. Any new model pulled via ollama pull, ollama run, or web UIs will write directly to your secondary drive.

← Model Loading Fixes All Ollama Windows Variables →
Advertisement