[GH-ISSUE #6301] ollama list does not show previously downloaded models #3950

Closed
opened 2026-04-12 14:49:36 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @ACodingfreak on GitHub (Aug 10, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6301

What is the issue?

I am not able to access previously downloaded models eventhough they are present in the system

I saw similar issue which is closed now
https://github.com/ollama/ollama/issues/1493

~/.ollama/models/blobs$ ls -al 
total 9104032
drwxr-xr-x 2 codingfreak codingfreak      12288 Aug  9 13:29 .
drwxr-xr-x 4 codingfreak codingfreak       4096 Aug  9 10:50 ..
-rw-r--r-- 1 codingfreak codingfreak      12320 Aug  9 13:29 sha256-0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177
-rw-r--r-- 1 codingfreak codingfreak       1692 Aug  9 13:29 sha256-11ce4ee3e170f6adebac9a991c22e22ab3f8530e154ee669954c4bc73061c258
-rw-r--r-- 1 codingfreak codingfreak        485 Aug  9 13:29 sha256-1a4c3c319823fdabddb22479d0b10820a7a39fe49e45c40bae28fbe83926dc14
-rw-r--r-- 1 codingfreak codingfreak        485 Aug  9 10:59 sha256-3f8eb4da87fa7a3c9da615036b0dc418d31fef2a30b115ff33562588b32c691d
-rw-r--r-- 1 codingfreak codingfreak      12403 Aug  9 10:59 sha256-4fa551d4f938f68b8c1e6afa9d28befb70e3f33f75d0753248d530364aeea40f
-rw-r--r-- 1 codingfreak codingfreak         96 Aug  9 13:29 sha256-56bb8bd477a519ffa694fc449c2413c6f0e1d3b1c88fa7e3c9d88d3ae49d4dcb
-rw-r--r-- 1 codingfreak codingfreak        110 Aug  9 10:59 sha256-577073ffcc6ce95b9981eacc77d1039568639e5638e83044994560d9ef82ce1b
-rw-r--r-- 1 codingfreak codingfreak 4661211424 Aug  9 10:59 sha256-6a0746a1ec1aef3e7ec53868f220ff6e389f6f8ef87a01d77c96807de94ca2aa
-rw-r--r-- 1 codingfreak codingfreak        254 Aug  9 10:59 sha256-8ab4849b038cf0abc5b1c9b8ee1443dca6b93a045c2272180d985126eb40bf6f
-rw-r--r-- 1 codingfreak codingfreak 4661216384 Aug  9 13:29 sha256-8eeb52dfb3bb9aefdf9d1ef24b3bdbcfbe82238798c4b918278320b6fcef18fe

(ollama) codingfreak@gpu01:~/.ollama/models/blobs$ ollama list
NAME    ID      SIZE    MODIFIED 
(ollama) codingfreak@gpu01:~/.ollama/models/blobs$ 
(ollama) codingfreak@gpu01:~/.ollama/models/blobs$ 
(ollama) codingfreak@gpu01:~/.ollama/models/blobs$ systemctl status ollama
● ollama.service - Ollama Service
     Loaded: loaded (/etc/systemd/system/ollama.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2024-08-10 08:22:23 PDT; 6min ago
   Main PID: 283262 (ollama)
      Tasks: 58 (limit: 76755)
     Memory: 5.3G
        CPU: 1min 46.274s
     CGroup: /system.slice/ollama.service
             └─283262 /usr/local/bin/ollama serve

Aug 10 08:22:23 gpu01 ollama[283262]: time=2024-08-10T08:22:23.798-07:00 level=INFO source=payload.go:30 msg="extracting embedded f>
Aug 10 08:22:26 gpu01 ollama[283262]: time=2024-08-10T08:22:26.142-07:00 level=INFO source=payload.go:44 msg="Dynamic LLM libraries>
Aug 10 08:22:26 gpu01 ollama[283262]: time=2024-08-10T08:22:26.142-07:00 level=INFO source=gpu.go:204 msg="looking for compatible G>
Aug 10 08:22:26 gpu01 ollama[283262]: time=2024-08-10T08:22:26.227-07:00 level=INFO source=types.go:105 msg="inference compute" id=>
Aug 10 08:22:38 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:22:38 | 200 |      81.891µs |       127.0.0.1 | HEAD     "/"
Aug 10 08:22:38 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:22:38 | 404 |     489.478µs |       127.0.0.1 | POST     "/api/show"
Aug 10 08:22:39 gpu01 ollama[283262]: time=2024-08-10T08:22:39.625-07:00 level=INFO source=download.go:175 msg="downloading 8eeb52d>
Aug 10 08:28:08 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:28:08 | 200 |       63.34µs |       127.0.0.1 | GET      "/api/version"
Aug 10 08:28:49 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:28:49 | 200 |      16.672µs |       127.0.0.1 | HEAD     "/"
Aug 10 08:28:49 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:28:49 | 200 |      91.154µs |       127.0.0.1 | GET      "/api/tags"

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.3.4

Originally created by @ACodingfreak on GitHub (Aug 10, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6301 ### What is the issue? I am not able to access previously downloaded models eventhough they are present in the system I saw similar issue which is closed now https://github.com/ollama/ollama/issues/1493 ``` ~/.ollama/models/blobs$ ls -al total 9104032 drwxr-xr-x 2 codingfreak codingfreak 12288 Aug 9 13:29 . drwxr-xr-x 4 codingfreak codingfreak 4096 Aug 9 10:50 .. -rw-r--r-- 1 codingfreak codingfreak 12320 Aug 9 13:29 sha256-0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177 -rw-r--r-- 1 codingfreak codingfreak 1692 Aug 9 13:29 sha256-11ce4ee3e170f6adebac9a991c22e22ab3f8530e154ee669954c4bc73061c258 -rw-r--r-- 1 codingfreak codingfreak 485 Aug 9 13:29 sha256-1a4c3c319823fdabddb22479d0b10820a7a39fe49e45c40bae28fbe83926dc14 -rw-r--r-- 1 codingfreak codingfreak 485 Aug 9 10:59 sha256-3f8eb4da87fa7a3c9da615036b0dc418d31fef2a30b115ff33562588b32c691d -rw-r--r-- 1 codingfreak codingfreak 12403 Aug 9 10:59 sha256-4fa551d4f938f68b8c1e6afa9d28befb70e3f33f75d0753248d530364aeea40f -rw-r--r-- 1 codingfreak codingfreak 96 Aug 9 13:29 sha256-56bb8bd477a519ffa694fc449c2413c6f0e1d3b1c88fa7e3c9d88d3ae49d4dcb -rw-r--r-- 1 codingfreak codingfreak 110 Aug 9 10:59 sha256-577073ffcc6ce95b9981eacc77d1039568639e5638e83044994560d9ef82ce1b -rw-r--r-- 1 codingfreak codingfreak 4661211424 Aug 9 10:59 sha256-6a0746a1ec1aef3e7ec53868f220ff6e389f6f8ef87a01d77c96807de94ca2aa -rw-r--r-- 1 codingfreak codingfreak 254 Aug 9 10:59 sha256-8ab4849b038cf0abc5b1c9b8ee1443dca6b93a045c2272180d985126eb40bf6f -rw-r--r-- 1 codingfreak codingfreak 4661216384 Aug 9 13:29 sha256-8eeb52dfb3bb9aefdf9d1ef24b3bdbcfbe82238798c4b918278320b6fcef18fe (ollama) codingfreak@gpu01:~/.ollama/models/blobs$ ollama list NAME ID SIZE MODIFIED (ollama) codingfreak@gpu01:~/.ollama/models/blobs$ (ollama) codingfreak@gpu01:~/.ollama/models/blobs$ (ollama) codingfreak@gpu01:~/.ollama/models/blobs$ systemctl status ollama ● ollama.service - Ollama Service Loaded: loaded (/etc/systemd/system/ollama.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2024-08-10 08:22:23 PDT; 6min ago Main PID: 283262 (ollama) Tasks: 58 (limit: 76755) Memory: 5.3G CPU: 1min 46.274s CGroup: /system.slice/ollama.service └─283262 /usr/local/bin/ollama serve Aug 10 08:22:23 gpu01 ollama[283262]: time=2024-08-10T08:22:23.798-07:00 level=INFO source=payload.go:30 msg="extracting embedded f> Aug 10 08:22:26 gpu01 ollama[283262]: time=2024-08-10T08:22:26.142-07:00 level=INFO source=payload.go:44 msg="Dynamic LLM libraries> Aug 10 08:22:26 gpu01 ollama[283262]: time=2024-08-10T08:22:26.142-07:00 level=INFO source=gpu.go:204 msg="looking for compatible G> Aug 10 08:22:26 gpu01 ollama[283262]: time=2024-08-10T08:22:26.227-07:00 level=INFO source=types.go:105 msg="inference compute" id=> Aug 10 08:22:38 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:22:38 | 200 | 81.891µs | 127.0.0.1 | HEAD "/" Aug 10 08:22:38 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:22:38 | 404 | 489.478µs | 127.0.0.1 | POST "/api/show" Aug 10 08:22:39 gpu01 ollama[283262]: time=2024-08-10T08:22:39.625-07:00 level=INFO source=download.go:175 msg="downloading 8eeb52d> Aug 10 08:28:08 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:28:08 | 200 | 63.34µs | 127.0.0.1 | GET "/api/version" Aug 10 08:28:49 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:28:49 | 200 | 16.672µs | 127.0.0.1 | HEAD "/" Aug 10 08:28:49 gpu01 ollama[283262]: [GIN] 2024/08/10 - 08:28:49 | 200 | 91.154µs | 127.0.0.1 | GET "/api/tags" ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.4
GiteaMirror added the bug label 2026-04-12 14:49:36 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 10, 2024):

What's the contents of /etc/systemd/system/ollama.service? The ollama service is running as user ollama, and if there are no overrides in ollama.service, the models will be in ~ollama/.ollama/models. I'm guessing that you previously ran ollama serve as user codingfreak, and that's why the models that you pulled are in ~codingfreak/.ollama. You can just move those files into ~ollama/.ollama, change the ownership, and they should be visible in ollama list.

<!-- gh-comment-id:2282236970 --> @rick-github commented on GitHub (Aug 10, 2024): What's the contents of /etc/systemd/system/ollama.service? The ollama service is running as user ollama, and if there are no overrides in ollama.service, the models will be in ~ollama/.ollama/models. I'm guessing that you previously ran `ollama serve` as user codingfreak, and that's why the models that you pulled are in ~codingfreak/.ollama. You can just move those files into ~ollama/.ollama, change the ownership, and they should be visible in `ollama list`.
Author
Owner

@ACodingfreak commented on GitHub (Aug 11, 2024):

Thanks for the reply @rick-github.

As shown in below logs, systemctl uses ollama as the default user to start ollama serve.

# cat /etc/systemd/system/ollama.service
[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=/usr/local/cuda-12.3/bin:/usr/local/cuda-12.3/bin:/usr/local/cuda-12.3/bin:/home/codingfreak/anaconda3/envs/llama3_test/bin:/home/codingfreak/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"

[Install]
WantedBy=default.target

As shown in below logs i do have respective folders for user:codingfreak and user:ollama.

  1. Does ollama list command only lists the models downloaded by ollama user ?
root@gpu01:/home/codingfreak/AIML# ollama list
NAME            ID              SIZE    MODIFIED     
llama3.1:latest 91ab477bec9d    4.7 GB  23 hours ago
root@gpu01:/home/codingfreak/AIML# ls -al  ~ollama/.ollama/models/blobs/
total 4552032
drwxr-xr-x 2 ollama ollama      12288 Aug 10 08:29 .
drwxr-xr-x 4 ollama ollama       4096 Aug 10 08:22 ..
-rw-r--r-- 1 ollama ollama      12320 Aug 10 08:29 sha256-0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177
-rw-r--r-- 1 ollama ollama       1692 Aug 10 08:29 sha256-11ce4ee3e170f6adebac9a991c22e22ab3f8530e154ee669954c4bc73061c258
-rw-r--r-- 1 ollama ollama        485 Aug 10 08:29 sha256-1a4c3c319823fdabddb22479d0b10820a7a39fe49e45c40bae28fbe83926dc14
-rw-r--r-- 1 ollama ollama         96 Aug 10 08:29 sha256-56bb8bd477a519ffa694fc449c2413c6f0e1d3b1c88fa7e3c9d88d3ae49d4dcb
-rw-r--r-- 1 ollama ollama 4661216384 Aug 10 08:29 sha256-8eeb52dfb3bb9aefdf9d1ef24b3bdbcfbe82238798c4b918278320b6fcef18fe
root@gpu01:/home/codingfreak/AIML# 
root@gpu01:/home/codingfreak/AIML# ls -al /home/codingfreak/.ollama/models/blobs/
total 9104032
drwxr-xr-x 2 codingfreak codingfreak      12288 Aug  9 13:29 .
drwxr-xr-x 4 codingfreak codingfreak       4096 Aug  9 10:50 ..
-rw-r--r-- 1 codingfreak codingfreak      12320 Aug  9 13:29 sha256-0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177
-rw-r--r-- 1 codingfreak codingfreak       1692 Aug  9 13:29 sha256-11ce4ee3e170f6adebac9a991c22e22ab3f8530e154ee669954c4bc73061c258
-rw-r--r-- 1 codingfreak codingfreak        485 Aug  9 13:29 sha256-1a4c3c319823fdabddb22479d0b10820a7a39fe49e45c40bae28fbe83926dc14
-rw-r--r-- 1 codingfreak codingfreak        485 Aug  9 10:59 sha256-3f8eb4da87fa7a3c9da615036b0dc418d31fef2a30b115ff33562588b32c691d
-rw-r--r-- 1 codingfreak codingfreak      12403 Aug  9 10:59 sha256-4fa551d4f938f68b8c1e6afa9d28befb70e3f33f75d0753248d530364aeea40f
-rw-r--r-- 1 codingfreak codingfreak         96 Aug  9 13:29 sha256-56bb8bd477a519ffa694fc449c2413c6f0e1d3b1c88fa7e3c9d88d3ae49d4dcb
-rw-r--r-- 1 codingfreak codingfreak        110 Aug  9 10:59 sha256-577073ffcc6ce95b9981eacc77d1039568639e5638e83044994560d9ef82ce1b
-rw-r--r-- 1 codingfreak codingfreak 4661211424 Aug  9 10:59 sha256-6a0746a1ec1aef3e7ec53868f220ff6e389f6f8ef87a01d77c96807de94ca2aa
-rw-r--r-- 1 codingfreak codingfreak        254 Aug  9 10:59 sha256-8ab4849b038cf0abc5b1c9b8ee1443dca6b93a045c2272180d985126eb40bf6f
-rw-r--r-- 1 codingfreak codingfreak 4661216384 Aug  9 13:29 sha256-8eeb52dfb3bb9aefdf9d1ef24b3bdbcfbe82238798c4b918278320b6fcef18fe
<!-- gh-comment-id:2282786496 --> @ACodingfreak commented on GitHub (Aug 11, 2024): Thanks for the reply @rick-github. As shown in below logs, systemctl uses ollama as the default user to start ollama serve. ``` # cat /etc/systemd/system/ollama.service [Unit] Description=Ollama Service After=network-online.target [Service] ExecStart=/usr/local/bin/ollama serve User=ollama Group=ollama Restart=always RestartSec=3 Environment="PATH=/usr/local/cuda-12.3/bin:/usr/local/cuda-12.3/bin:/usr/local/cuda-12.3/bin:/home/codingfreak/anaconda3/envs/llama3_test/bin:/home/codingfreak/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" [Install] WantedBy=default.target ``` As shown in below logs i do have respective folders for user:codingfreak and user:ollama. 1. Does ollama list command only lists the models downloaded by ollama user ? ``` root@gpu01:/home/codingfreak/AIML# ollama list NAME ID SIZE MODIFIED llama3.1:latest 91ab477bec9d 4.7 GB 23 hours ago ``` ``` root@gpu01:/home/codingfreak/AIML# ls -al ~ollama/.ollama/models/blobs/ total 4552032 drwxr-xr-x 2 ollama ollama 12288 Aug 10 08:29 . drwxr-xr-x 4 ollama ollama 4096 Aug 10 08:22 .. -rw-r--r-- 1 ollama ollama 12320 Aug 10 08:29 sha256-0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177 -rw-r--r-- 1 ollama ollama 1692 Aug 10 08:29 sha256-11ce4ee3e170f6adebac9a991c22e22ab3f8530e154ee669954c4bc73061c258 -rw-r--r-- 1 ollama ollama 485 Aug 10 08:29 sha256-1a4c3c319823fdabddb22479d0b10820a7a39fe49e45c40bae28fbe83926dc14 -rw-r--r-- 1 ollama ollama 96 Aug 10 08:29 sha256-56bb8bd477a519ffa694fc449c2413c6f0e1d3b1c88fa7e3c9d88d3ae49d4dcb -rw-r--r-- 1 ollama ollama 4661216384 Aug 10 08:29 sha256-8eeb52dfb3bb9aefdf9d1ef24b3bdbcfbe82238798c4b918278320b6fcef18fe root@gpu01:/home/codingfreak/AIML# root@gpu01:/home/codingfreak/AIML# ls -al /home/codingfreak/.ollama/models/blobs/ total 9104032 drwxr-xr-x 2 codingfreak codingfreak 12288 Aug 9 13:29 . drwxr-xr-x 4 codingfreak codingfreak 4096 Aug 9 10:50 .. -rw-r--r-- 1 codingfreak codingfreak 12320 Aug 9 13:29 sha256-0ba8f0e314b4264dfd19df045cde9d4c394a52474bf92ed6a3de22a4ca31a177 -rw-r--r-- 1 codingfreak codingfreak 1692 Aug 9 13:29 sha256-11ce4ee3e170f6adebac9a991c22e22ab3f8530e154ee669954c4bc73061c258 -rw-r--r-- 1 codingfreak codingfreak 485 Aug 9 13:29 sha256-1a4c3c319823fdabddb22479d0b10820a7a39fe49e45c40bae28fbe83926dc14 -rw-r--r-- 1 codingfreak codingfreak 485 Aug 9 10:59 sha256-3f8eb4da87fa7a3c9da615036b0dc418d31fef2a30b115ff33562588b32c691d -rw-r--r-- 1 codingfreak codingfreak 12403 Aug 9 10:59 sha256-4fa551d4f938f68b8c1e6afa9d28befb70e3f33f75d0753248d530364aeea40f -rw-r--r-- 1 codingfreak codingfreak 96 Aug 9 13:29 sha256-56bb8bd477a519ffa694fc449c2413c6f0e1d3b1c88fa7e3c9d88d3ae49d4dcb -rw-r--r-- 1 codingfreak codingfreak 110 Aug 9 10:59 sha256-577073ffcc6ce95b9981eacc77d1039568639e5638e83044994560d9ef82ce1b -rw-r--r-- 1 codingfreak codingfreak 4661211424 Aug 9 10:59 sha256-6a0746a1ec1aef3e7ec53868f220ff6e389f6f8ef87a01d77c96807de94ca2aa -rw-r--r-- 1 codingfreak codingfreak 254 Aug 9 10:59 sha256-8ab4849b038cf0abc5b1c9b8ee1443dca6b93a045c2272180d985126eb40bf6f -rw-r--r-- 1 codingfreak codingfreak 4661216384 Aug 9 13:29 sha256-8eeb52dfb3bb9aefdf9d1ef24b3bdbcfbe82238798c4b918278320b6fcef18fe ```
Author
Owner

@rick-github commented on GitHub (Aug 11, 2024):

ollama lists models found in the directory indicated by OLLAMA_MODELS. If not overridden, OLLAMA_MODELS is $HOME/.ollama/models. You could add Environment="OLLAMA_MODELS=/home/codingfreak/.ollama/models" to /etc/systemd/system/ollama.service and chmod -R a+w /home/codingfreak/.ollama/models and ollama will store models in ~codingfreak/.ollama/models.

<!-- gh-comment-id:2282789430 --> @rick-github commented on GitHub (Aug 11, 2024): ollama lists models found in the [directory](https://github.com/ollama/ollama/blob/main/docs/faq.md#where-are-models-stored) indicated by `OLLAMA_MODELS`. If not overridden, ` OLLAMA_MODELS` is `$HOME/.ollama/models`. You could add `Environment="OLLAMA_MODELS=/home/codingfreak/.ollama/models"` to /etc/systemd/system/ollama.service and `chmod -R a+w /home/codingfreak/.ollama/models` and ollama will store models in ~codingfreak/.ollama/models.
Author
Owner

@FellowTraveler commented on GitHub (Aug 12, 2024):

@ACodingfreak If this is just a issue of 2 different usernames then can you close this issue?

<!-- gh-comment-id:2282936748 --> @FellowTraveler commented on GitHub (Aug 12, 2024): @ACodingfreak If this is just a issue of 2 different usernames then can you close this issue?
Author
Owner

@nevakrien commented on GitHub (Jan 26, 2025):

same issue today also runing ollama serve

<!-- gh-comment-id:2614445935 --> @nevakrien commented on GitHub (Jan 26, 2025): same issue today also runing ollama serve
Author
Owner

@nigamankit7 commented on GitHub (Jan 31, 2025):

same issue. downloaded deepseekr1 two days back and was working fine. Today when running ollama, no model is shown. When checked the folder path, the model files are present.

<!-- gh-comment-id:2627714564 --> @nigamankit7 commented on GitHub (Jan 31, 2025): same issue. downloaded deepseekr1 two days back and was working fine. Today when running ollama, no model is shown. When checked the folder path, the model files are present.
Author
Owner

@rick-github commented on GitHub (Jan 31, 2025):

Did you restart the ollama server? What folder path are the models stored in? What's in the server logs?

<!-- gh-comment-id:2627767121 --> @rick-github commented on GitHub (Jan 31, 2025): Did you restart the ollama server? What folder path are the models stored in? What's in the [server logs](https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues)?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3950