Ollama stores AI models in ~/.ollama
by default, but if you want to use an external drive or a different location, you can change this with a symbolic link. This guide shows you how.
Step 1: Install Ollama
First, install Ollama by following the official instructions:
- Mac App: Just download the app and drag it into Applications: https://ollama.com/download
Alternatively you can install via homebrew: brew install ollama
Step 2: Remove the Existing .ollama
Directory
Ollama stores its models in ~/.ollama
. If you've already downloaded models, back them up before creating the symlink.
mv ~/.ollama ~/.ollama_backup
Step 3: Create a Symlink to Your New Location
Choose the location where you want Ollama to store models. If you have an external SSD or another directory, point the symlink there.
ln -s /Volumes/SSD/Ollama ~/.ollama
Step 4: Verify the Symlink
Check that ~/.ollama
now points to your chosen directory:
ls -l ~/.ollama
If the output shows ~/.ollama -> /Volumes/SSD/Ollama
, it's working.
Step 5: Test Ollama
Run a model to confirm it's downloading to the new location:
ollama run deepseek-r1:32b
Then check the model directory:
ls -l /Volumes/SSD/Ollama/models
If you see the downloaded model there, the setup is complete! Now, Ollama will store all models in your preferred location.