[GH-ISSUE #986] Uninstall ollama from linux #26240

Closed
opened 2026-04-22 02:19:50 -05:00 by GiteaMirror · 14 comments
Owner

Originally created by @sheecegardezi on GitHub (Nov 3, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/986

Here's a general guideline on how to uninstall it:

  1. Delete the Ollama binary:
    Use the rm command to remove the Ollama binary. For example:

    sudo rm /usr/local/bin/ollama
    
  2. If the script created a systemd service, disable and remove it:
    If the script created a systemd service for Ollama, you should disable and remove it using the following commands:

    sudo systemctl stop ollama
    sudo systemctl disable ollama
    sudo rm /etc/systemd/system/ollama.service
    sudo systemctl daemon-reload
    
  3. Remove any created user and group (if applicable):
    The script might have created a user and group named "ollama." You can remove them using the following commands:

    sudo userdel ollama
    sudo groupdel ollama
    
Originally created by @sheecegardezi on GitHub (Nov 3, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/986 Here's a general guideline on how to uninstall it: 1. Delete the Ollama binary: Use the `rm` command to remove the Ollama binary. For example: ``` sudo rm /usr/local/bin/ollama ``` 2. If the script created a systemd service, disable and remove it: If the script created a systemd service for Ollama, you should disable and remove it using the following commands: ``` sudo systemctl stop ollama sudo systemctl disable ollama sudo rm /etc/systemd/system/ollama.service sudo systemctl daemon-reload ``` 3. Remove any created user and group (if applicable): The script might have created a user and group named "ollama." You can remove them using the following commands: ``` sudo userdel ollama sudo groupdel ollama ```
Author
Owner

@BruceMacD commented on GitHub (Nov 3, 2023):

Hi @sheecegardezi, thanks for helping to document this. It's also in our linux.md doc, down at the bottom.

Resolving this issue now as there is no further work to be done, but it should be useful for other people to see this when they search our issues in the future.

<!-- gh-comment-id:1792587049 --> @BruceMacD commented on GitHub (Nov 3, 2023): Hi @sheecegardezi, thanks for helping to document this. It's also in our [linux.md](https://github.com/jmorganca/ollama/blob/main/docs/linux.md#uninstall) doc, down at the bottom. Resolving this issue now as there is no further work to be done, but it should be useful for other people to see this when they search our issues in the future.
Author
Owner

@aravhawk commented on GitHub (Apr 22, 2024):

Who would want to remove something so great like ollama 😁?

<!-- gh-comment-id:2070074764 --> @aravhawk commented on GitHub (Apr 22, 2024): Who would want to remove something so great like ollama 😁?
Author
Owner

@MoonIRL commented on GitHub (May 11, 2024):

Uninstall ollama from Windows? @sheecegardezi @BruceMacD

<!-- gh-comment-id:2105941041 --> @MoonIRL commented on GitHub (May 11, 2024): Uninstall ollama from Windows? @sheecegardezi @BruceMacD
Author
Owner

@BruceMacD commented on GitHub (May 13, 2024):

@Wang-Mer Ollama can be uninstalled on Windows from the Programs and Features settings.

<!-- gh-comment-id:2108239201 --> @BruceMacD commented on GitHub (May 13, 2024): @Wang-Mer Ollama can be uninstalled on Windows from the [Programs and Features](https://support.microsoft.com/en-us/windows/uninstall-or-remove-apps-and-programs-in-windows-4b55f974-2cc6-2d2b-d092-5905080eaf98#:~:text=In%20the%20search%20box%20on,select%20Uninstall%20or%20Uninstall%2FChange.) settings.
Author
Owner

@MoonIRL commented on GitHub (May 19, 2024):

@Wang-Mer Ollama can be uninstalled on Windows from the Programs and Features settings.

Is there any problem of unclean deletion?

<!-- gh-comment-id:2119193711 --> @MoonIRL commented on GitHub (May 19, 2024): > @Wang-Mer Ollama can be uninstalled on Windows from the [Programs and Features](https://support.microsoft.com/en-us/windows/uninstall-or-remove-apps-and-programs-in-windows-4b55f974-2cc6-2d2b-d092-5905080eaf98#:~:text=In%20the%20search%20box%20on,select%20Uninstall%20or%20Uninstall%2FChange.) settings. Is there any problem of unclean deletion?
Author
Owner

@BiRo96 commented on GitHub (May 31, 2024):

Who would want to remove something so great like ollama 😁?

Me, who just solved to make ollama and open-webui in one YAML file, so I can launch it all-in-one with docker-compose and transfer it with it's files to my other computers if I want. But unfortunatelly I installed it directly to my linux computer at the first time, without dockerising it :P
Now that I totally fell in love with this software, I just want to keep it in docker containers.
That's my reason to remove ollama from my PC's main OS.

<!-- gh-comment-id:2142994762 --> @BiRo96 commented on GitHub (May 31, 2024): > Who would want to remove something so great like ollama 😁? Me, who just solved to make ollama and open-webui in one YAML file, so I can launch it all-in-one with docker-compose and transfer it with it's files to my other computers if I want. But unfortunatelly I installed it directly to my linux computer at the first time, without dockerising it :P Now that I totally fell in love with this software, I just want to keep it in docker containers. That's my reason to remove ollama from my PC's main OS.
Author
Owner

@robmenas commented on GitHub (Jul 19, 2024):

Uninstall ollama from Windows?

@Wang-Mer I haven't tested it because I haven't needed to, but wouldn't winget uninstall --id Ollama.Ollama be enough?

<!-- gh-comment-id:2240414253 --> @robmenas commented on GitHub (Jul 19, 2024): > Uninstall ollama from Windows? @Wang-Mer I haven't tested it because I haven't needed to, but wouldn't `winget uninstall --id Ollama.Ollama` be enough?
Author
Owner

@MoonIRL commented on GitHub (Oct 17, 2024):

从 Windows 卸载 ollama?

@Wang-Mer 我没有测试过,因为我不需要,但这还不够winget uninstall --id Ollama.Ollama吗?

I installed it using exe

<!-- gh-comment-id:2418811145 --> @MoonIRL commented on GitHub (Oct 17, 2024): > > 从 Windows 卸载 ollama? > > @Wang-Mer 我没有测试过,因为我不需要,但这还不够`winget uninstall --id Ollama.Ollama`吗? I installed it using exe
Author
Owner

@satheshshiva commented on GitHub (Jan 8, 2025):

You may need to remove the downloaded models on /usr/share/ollama

<!-- gh-comment-id:2576738230 --> @satheshshiva commented on GitHub (Jan 8, 2025): You may need to remove the downloaded models on `/usr/share/ollama`
Author
Owner

@yhw-miracle commented on GitHub (Jan 13, 2025):

#!/bin/bash

sudo rm -v /usr/local/bin/ollama
sudo rm -rv /usr/local/lib/ollama

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm -v /etc/systemd/system/ollama.service
sudo systemctl daemon-reload

sudo userdel ollama
sudo groupdel ollama

sudo rm -rv /usr/share/ollama
<!-- gh-comment-id:2586319532 --> @yhw-miracle commented on GitHub (Jan 13, 2025): ```bash #!/bin/bash sudo rm -v /usr/local/bin/ollama sudo rm -rv /usr/local/lib/ollama sudo systemctl stop ollama sudo systemctl disable ollama sudo rm -v /etc/systemd/system/ollama.service sudo systemctl daemon-reload sudo userdel ollama sudo groupdel ollama sudo rm -rv /usr/share/ollama ```
Author
Owner

@disarticulate commented on GitHub (Jan 24, 2025):

are we should this is all accurate. I moved ollama into a docker service, after running it on the bare metal linux, and keep seeing it start up even though I replaced the service file et al.

<!-- gh-comment-id:2612575421 --> @disarticulate commented on GitHub (Jan 24, 2025): are we should this is all accurate. I moved ollama into a docker service, after running it on the bare metal linux, and keep seeing it start up even though I replaced the service file et al.
Author
Owner

@ocgg commented on GitHub (Feb 6, 2025):

I had to add:

rm -rv ~/.ollama

Who would want to remove something so great like ollama 😁?

Especially anyone who wants Vulkan support
(oops, I initally mentioned the PR 5059 and saw I uselessly polluted its thread. I deleted my original post but the mention remains. Didn't mean it...)

<!-- gh-comment-id:2639620343 --> @ocgg commented on GitHub (Feb 6, 2025): I had to add: ``` rm -rv ~/.ollama ``` > Who would want to remove something so great like ollama 😁? Especially anyone who wants Vulkan support (oops, I initally mentioned the PR 5059 and saw I uselessly polluted its thread. I deleted my original post but the mention remains. Didn't mean it...)
Author
Owner

@ForwardFeed commented on GitHub (Dec 22, 2025):

My installation of ollama probably was made a bit differently
So, i'll show what I had to delete
Unsure if I did not forget anything

sudo rm -rv /usr/lib/ollama/
sudo rm -rv /usr/local/lib/ollama

rm -rv .ollama/

I also deleted rocm which iirc was needed with AMD chips.
In total this freed 20G from my main partition which I need to keep slim.

<!-- gh-comment-id:3684218339 --> @ForwardFeed commented on GitHub (Dec 22, 2025): My installation of ollama probably was made a bit differently So, i'll show what I had to delete Unsure if I did not forget anything ``` sudo rm -rv /usr/lib/ollama/ sudo rm -rv /usr/local/lib/ollama rm -rv .ollama/ ``` I also deleted rocm which iirc was needed with AMD chips. In total this freed 20G from my main partition which I need to keep slim.
Author
Owner

@yuwash commented on GitHub (Mar 19, 2026):

Small note: the documentation file has been renamed to linux.mdx but it largely describes the same steps as described above

<!-- gh-comment-id:4090366941 --> @yuwash commented on GitHub (Mar 19, 2026): Small note: the documentation file has been renamed to [linux.mdx](https://github.com/ollama/ollama/blob/main/docs/linux.mdx#uninstall) but it largely describes the same steps as described above
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#26240