How to Properly Remove a Model from Ollama on Your PC
In this guide, you’ll learn the step-by-step process for uninstalling a model from Ollama, specifically using the Deepseek R1 model as an example. Removing unnecessary models can help you clear up space on your computer and manage your AI models more effectively. By following the steps outlined, you will ensure that all remnants of the model are fully deleted from your system.
Step 1: Access the Ollama Models Tab
Start by opening your Ollama application and navigate to the models tab. Here, you will see a list of all installed models. It’s important to select the correct model you wish to uninstall. In this tutorial, we will focus on the removal of the Deepseek R1 model.
Step 2: Open the Command Prompt
Next, you need to access the command prompt. To do this, press the Windows key on your keyboard and type “CMD” into the search bar. Click on the Command Prompt application when it appears in the search results. This step is essential as you will use the command line interface to uninstall the model.
Step 3: Execute the Uninstall Command
Once the command prompt is open, type in the following command: Ollama R M deepseek dash r1
. After typing the command, press Enter. If the uninstall process is successful, you will see a prompt that reads “deleted deepseek r1”. Note that while this command works most of the time, there may be instances where it fails to delete the model completely.
Step 4: Verify the Deletion
To ensure the model has been successfully removed, you will need to check a specific directory on your computer. Navigate to your C drive, locate the Users folder, and find the .ollama
folder. Inside this folder, go to the blobs
directory. If the removal was unsuccessful, you might see a large file associated with Deepseek R1 still present here. You can confirm the model is still installed by returning to the command prompt and executing: ollama run deepseek dash r1
. If the model runs, then it has not been deleted.
Step 5: Manually Delete Residual Files
If the model is still present, you’ll need to delete the associated files manually. Go back to the blobs
folder and locate the large file for Deepseek R1. It is highly advisable to back up any models you may want to restore in the future into a separate folder before deletion. After backing up as necessary, delete the large file associated with the model. This action will ensure that the model is fully removed from your system.
Extra Tips & Common Issues
Sometimes, removing models via command line may not work as expected due to various reasons, including permission issues or incomplete installations. Always ensure that you have the necessary administrative rights when using the command prompt. Keep a backup of your models in case you want to reinstall them later.
Conclusion
Following these steps will help you effectively manage and uninstall models from Ollama, freeing up valuable space on your hard drive. Always verify the removal afterward to avoid clutter on your system. With proper model management, you can ensure optimal performance while using Ollama.
Frequently Asked Questions
How do I check if a model is still installed?
You can verify installation by attempting to run the model through the command prompt with the command: ollama run deepseek dash r1
. If the model runs, it is still installed.
What should I do if the command doesn’t work?
Ensure that your command is correctly written, and that you are running the command prompt as an administrator. If issues persist, manually check the .ollama
folder for residual files.
Can I reinstall the model after deletion?
Yes, but it’s recommended to backup any necessary models before deletion, so you have the option to reinstall them without losing data.