Models take gigabytes of disk and memory, so you need to know what is installed and what is loaded.
Ollama keeps models on disk and loads them into memory when used. The main commands:
ollama pull gemma4:e2bdownloads (or updates) a model without starting a chat.ollama ls(orollama list) shows downloaded models with their size and when they were changed.ollama psshows models currently loaded in memory, how much memory they use, whether they run on GPU or CPU, the context size, and when they will be unloaded.ollama stop gemma4:e2bunloads a model from memory now (it stays on disk).ollama show gemma4:e2bprints details: parameter count, quantization, context length and capabilities such as tools or vision.--modelfileshows its recipe (a later lesson).ollama cp gemma4:e2b my-gemmamakes a copy under a new name.ollama rm gemma4:e2bdeletes it from disk.
Names and tags. A model name has a family and a tag after the colon: qwen3:8b, gemma4:e2b. Tags usually mark the size or variant. Without a tag, Ollama uses latest, which is the family's default variant. Pin a specific tag in scripts and apps so they don't change unexpectedly when the default moves.
Loaded models stay in memory for a while after the last request (5 minutes by default), so the next request is fast. That is why ollama ps can show models you're not actively using.
Running ollama pull again on an existing model downloads only the changed parts, so it is the way to update a model.
Example
ollama pull qwen3:8b # download without running
ollama ls
# NAME ID SIZE MODIFIED
# qwen3:8b 500a1f067a9f 5.2 GB 2 minutes ago
# gemma4:e2b 7c1fa3e5a1b2 7.2 GB 3 days ago
ollama ps # what is loaded right now
# NAME ID SIZE PROCESSOR CONTEXT UNTIL
# qwen3:8b 500a... 6.9 GB 100% GPU 4096 4 minutes from now
ollama show qwen3:8b # parameters, quantization, context, capabilities
ollama stop qwen3:8b # free the memory now
ollama rm gemma4:e2b # delete from diskRemember
pull,ls,rmmanage models on diskpsandstopmanage models loaded in memory- Names are family:tag; pin tags in apps instead of relying on
latest
Watch out for
- Deleting a model with rm when you only wanted to free memory; use ollama stop for that.