Local model collections can accumulate unwanted names after testing or importing. Removing an Ollama model deletes the selected local name and can free disk space when no other local name references the same layers.
Several names can point to the same stored weights. Deleting a copied name leaves shared layers available to models that still reference them, so the displayed model size is not a promise of recovered disk space.
Ollama must already be running on the server whose models you intend to change. A removed library model can be downloaded again, while a custom model may require its original files and settings to be recreated.
Steps to remove an Ollama model:
- Identify the exact installed model name to remove.
$ ollama list NAME ID SIZE MODIFIED example/qwen-copy:latest 6467b5fd1dd4 397 MB Less than a second ago qwen2.5:0.5b 6467b5fd1dd4 397 MB 5 hours ago
The target here is example/qwen-copy:latest, a disposable copy of qwen2.5:0.5b. For a different target, use its exact name and tag from the list. A connection error means the CLI cannot reach the Ollama server.
Related: How to list Ollama models
Related: How to start the Ollama server - Remove only the selected local model name.
Removal does not ask for confirmation. Applications using the deleted name will no longer find it. If this is the only copy of a custom model, a restorable backup or the files and settings needed to recreate it must be available before deletion.
Related: How to back up and restore Ollama data$ ollama rm example/qwen-copy:latest deleted 'example/qwen-copy:latest'
- Confirm that the deleted name is absent from the installed models.
$ ollama list NAME ID SIZE MODIFIED qwen2.5:0.5b 6467b5fd1dd4 397 MB 5 hours ago
The copied name is gone and the original remains installed. Its shared weights remain on disk because qwen2.5:0.5b still uses them.
- Run the retained model to confirm it still answers prompts.
$ ollama run qwen2.5:0.5b "What is 17 plus 25? Answer in one short sentence." 17 plus 25 equals 42.
The answer should give 42; wording can vary. A reply confirms that removing the copied name left the original model usable.
Related: How to run a model in Ollama