Join our Discord Server
Karan Singh Karan is a highly experienced DevOps Engineer with over 13 years of experience in the IT industry. Throughout his career, he has developed a deep understanding of the principles of DevOps, including continuous integration and deployment, automated testing, and infrastructure as code.

How to uninstall Ollama

1 min read

Hey there! So, you’ve been using Ollama but now it’s time to bid it farewell. Whether you’ve found another tool that better suits your needs or simply no longer requires its services, uninstalling Ollama is a breeze. Let’s walk through the process step by step:

Stop the Ollama Service

First things first, we need to stop the Ollama service from running. This ensures a smooth uninstallation process. Open your terminal and enter the following command:

sudo systemctl stop ollama

This command halts the Ollama service.

Disable the Ollama Service

Now that the service is stopped, we need to disable it so that it doesn’t start up again upon system reboot. Enter the following command:

sudo systemctl disable ollama

This ensures that Ollama won’t automatically start up in the future.

Remove the Service File

We need to tidy up by removing the service file associated with Ollama. Enter the following command:

sudo rm /etc/systemd/system/ollama.service

This deletes the service file from your system.

Delete the Ollama Binary

Next up, we’ll remove the Ollama binary itself. Enter the following command:

sudo rm $(which ollama)

This command removes the binary from your bin directory.

Remove Downloaded Models and Ollama User

Lastly, we’ll clean up any remaining bits and pieces. Enter the following commands one by one:

sudo rm -r /usr/share/ollama 
sudo userdel ollama sudo groupdel ollama

These commands delete any downloaded models and remove the Ollama user and group from your system.

And that’s it! You’ve successfully uninstalled Ollama from your system. If you ever decide to reinstall it in the future, just follow the installation steps again. If you have any questions or run into any issues, feel free to reach out. Happy computing!

Have Queries? Join https://launchpass.com/collabnix

Karan Singh Karan is a highly experienced DevOps Engineer with over 13 years of experience in the IT industry. Throughout his career, he has developed a deep understanding of the principles of DevOps, including continuous integration and deployment, automated testing, and infrastructure as code.
Join our Discord Server
Index