Ollama is an environment for running so-called LLMs (large language models) on Linux. It is a secure and, above all, data-efficient way to try out various models on a local computer. Additionally, a system service is installed that runs automatically with every start. So what to do if you want to remove Ollama? The developers don’t say anything about this, which is why I’m documenting the procedure here:
First, we remove the command line program.
sudo rm /usr/local/bin/ollama
Additionally, as mentioned in the beginning, a system service is installed that runs automatically with every system restart. This will first be stopped and then removed as follows.
sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service
sudo systemctl daemon-reload
We also remove system users that were created exclusively for running the program.
sudo userdel ollama
sudo groupdel ollama
Thus, the uninstallation is complete.