Most Ollama commands mirror Docker syntax for running, listing, and managing images—making it easy to get started if you’ve used Docker before.
Quick Reference
| Command | Purpose | Example |
|---|---|---|
| ollama run | Pull (if needed) and start a model | ollama run MODEL_NAME |
| ollama stop | Terminate a background model | ollama stop MODEL_NAME |
| ollama list | Display all local models | ollama list |
| ollama rm | Remove a model to free disk space | ollama rm MODEL_NAME |
| ollama pull | Download a model without launching it | ollama pull MODEL_NAME |
| ollama show | Inspect model metadata (quantization, etc.) | ollama show MODEL_NAME |
| ollama ps | List currently running models | ollama ps |
ollama run
Start a model session. If the specified model isn’t on your machine, Ollama will:- Download its manifest and layers
- Verify the SHA-256 digests
- Save the manifest locally
- Launch an interactive chat interface
ollama stop
When you run a model in the background (e.g., via& on Unix), stop it gracefully with:
ollama list
List all models stored on your local host, along with their IDs, sizes, and last modification times. Use this to identify large or outdated models:ollama rm
Remove a model from your system to reclaim disk space. You can always re-pull it later.ollama pull
If you want to prefetch a model without starting it immediately, use:ollama run MODEL_NAME will skip downloads.
ollama show
Inspect model metadata—such as license details and quantization format—without running it:/show command.
ollama ps
Similar todocker ps, this command lists all active model processes, their resource consumption, and remaining runtime:
Keep an eye on running models. Stopping unused ones prevents unnecessary GPU/CPU usage and conserves system memory.
These core commands will help you manage Ollama models effectively. Happy modeling!