Ollama: Moving the models folder to a different drive in Kubuntu

Ollama Logo

I ran out of space on my system drive because of Ollama’s AI models. To fix this, I decided to move the Ollama models folder to a secondary drive.

By default ollama uses this place to store the models /usr/share/ollama/.ollama/models

I stopped the ollama

And created a new folder on the new disk

then I synced the files via rsync

After that I added new place to the ollama service config

you need to change or in my case append the next

Rename your old models folder to something like models-tmp

Then restart the daemon and ollama

You can validate that the new folder is configured properly by executing the next. Scroll to the right of the output to see the new folder

if everything ok validate your models

if your models om place remove the old folder

and check the disk space

You May Also Like

About the Author: vo