Ollama list, pull, run: the commands essentielles

Ollama is largely controlled from the terminal: ollama pull to download a model, ollama run to chat with it, ollama list to see what's installed. This guide covers the everyday commands (pull, run, list, ps, show, stop, rm, create, cp), with one example per command and an explanation of how to read their output. Keep it open next to your terminal for the first few weeks.
#Why learn the Ollama commands
Ollama runs in the background (the “server,” which listens on http://localhost:11434) and provides a small command-line program, ollama, that sends it commands. GUIs like Open WebUI go through the same server: they can chat with a model, but can't always check what's using GPU memory, inspect a model's parameters, or clean up the disk.
Nine commands cover the essentials. They fall into three groups: getting and using a model (pull, run), managing models stored on disk (list, show, rm, cp, create), and managing models loaded in memory (ps, stop). Keeping this disk/memory distinction in mind avoids most confusion: a model can be downloaded without being loaded, and loaded without you currently chatting with it.
#Prerequisites
Benefit from our experience and a guided path to build your local assistant and use your AI every day.
- Lifetime online access
- PDF + files
- Refunded within 30 days
- Ollama installed
- On Windows, macOS, or Linux. If you haven't done this yet, follow the installation guide first (link at the bottom of the page).
- A terminal
- PowerShell or Windows Terminal, Terminal on macOS, any shell on Linux. The commands are identical on all three systems.
- The server running
- The Ollama app on Windows and macOS, or the systemd service on Linux. Without it, most commands return a connection error.
- Room on the disk
- A small 3B model in Q4_K_M takes up about 2 GB, a 7B about 5 GB, and a 14B about 9 GB.
The first command shows the client version and, if the server responds, the server version too. The second lists every command available on your installation. Check it if an example in this guide doesn't work for you.
#Step 1 — ollama pull et ollama run: getting and running a model
#ollama pull: télécharger
ollama pull downloads a model from the official library (ollama.com/library) without running it. The name follows the format model:tag. Without a tag, Ollama uses latest, which usually points to the default size and quantization, often Q4_K_M.
The available tags (sizes, quantizations such as q8_0 or fp16) are listed on each model's page in the library. If the download is interrupted, rerunning the same command resumes where it left off.
#ollama run: chat with a model
ollama run loads the model into memory and opens a chat session in the terminal. If the model isn't on disk yet, run downloads it first. So you don't have to use pull, but it lets you get models ready ahead of time.
In the interactive session, commands start with a forward slash. Type /? for the full list on your version. These are the most useful ones.
- /bye
- Exit the session (Ctrl+D also works). The model stays loaded in memory for a few minutes.
- /clear
- Clear the current conversation history without exiting.
- /set parameter num_ctx 8192
- Change a parameter for the session, here the context size. Useful for testing before adding it to a Modelfile.
- /show info
- Show information about the loaded model, like ollama show.
- """
- Open and then close a multiline text block, handy for pasting a long excerpt.
With --verbose, Ollama shows timings and speeds after each response (including eval rate, in tokens per second). It's the easiest way to measure a model's speed on your own machine instead of relying on a figure you found somewhere else.
#Step 2 — ollama list and ollama rm: managing models on disk
#ollama list: voir ce qui est installé
ollama list (or its alias ollama ls) shows every model on disk. Run it before you delete anything, and use it to find the exact model name to pass to other commands.
- NAME
- Full name with its tag. This exact name is what run, show, rm, and cp expect.
- ID
- The beginning of the manifest hash. Two names with the same ID refer to the same model, which is typically the case after an ollama cp.
- SIZE
- Size of the model files on disk. It gives a rough idea of the memory required, but the memory actually used once loaded is higher (context, KV cache): ollama ps is what shows it.
- MODIFIED
- Date of the last download or creation. An old model isn't necessarily outdated: run pull again to see whether a newer version exists under the same tag.
Be careful when adding up sizes: models that share layers (a model and its copy, or a custom model built from another one) store them only once. The total of the SIZE column can therefore be larger than the space actually used in the models folder.
#ollama rm: delete a model
rm removes the model from the list and deletes any files that no other model uses anymore. There's no trash and no confirmation: to get it back, you'll have to download it again. To free up disk space more thoroughly or uninstall Ollama, the maintenance guide explains the steps for each operating system.
#Step 3 — ollama ps and ollama stop: managing memory
When you exit a session with /bye, the model isn't unloaded right away: Ollama keeps it in memory for a while (5 minutes by default, configurable with the OLLAMA_KEEP_ALIVE environment variable) so the next prompt starts without delay. ollama ps shows what's loaded right now.
- SIZE
- Memory used by the loaded model, including context. It's larger than the on-disk size shown by ollama list.
- PROCESSOR
- The most useful column. “100% GPU”: everything fits in VRAM, which is the ideal case. A CPU/GPU split means part of the model spills over into system memory, and generation slows down significantly. “100% CPU”: no GPU is used.
- UNTIL
- When the model will be unloaded if it receives no further requests.
- CONTEXT
- Depending on the version, a column also shows the allocated context size. If it's missing on your setup, ollama show donne the configured value.
If PROCESSOR shows a CPU/GPU split for a model that should fit on your card (for example, a 7B in Q4, about 5 GB, on a 12 GB RTX 3060), first check whether another model is loaded at the same time or whether the context size is too large.
#ollama stop: unload a model
stop immediately frees the memory used by that model without deleting it from disk. It's useful before launching a game, rendering software, or another, larger model. Don't confuse it with rm: stop acts on memory, rm on disk.
#Step 4 — ollama show: inspect a model
ollama show displays the details of an installed model: architecture, parameter count, maximum context length, embedding size, quantization, capabilities (tools, vision, reasoning, depending on the model), default parameters, and license. Check it first before you adjust the context size or write a Modelfile.
- --parameters
- Inference parameters set by the model's author. If nothing is displayed, Ollama's default values apply.
- --modelfile
- An ideal starting point for customizing a model: copy the output to a file, edit it, then pass it to ollama create.
- --template
- The message format the model expects. Change it only if you know why: a wrong template severely degrades responses.
- --license
- The license text. Read it before any commercial use: open-weight model licenses are not all equal.
- -v / --verbose
- On recent versions, displays additional metadata from the model file.
#Step 5 — ollama create et ollama cp: create your own variants
#ollama create: construire un modèle à partir d'un Modelfile
A Modelfile is a small text file that starts from an existing model and adds a system prompt, parameters, or a template. ollama create le turns it into a new model that appears in ollama list. The base model's layers are reused, so the variant takes up almost no disk space.
If the file is named exactly Modelfile and is in the current folder, the -f option can be omitted, depending on the version. ollama create sait can also import weights in GGUF format (FROM ./modele.gguf) or quantize an FP16 model with the --quantize (-q) option, for example -q q4_K_M. All Modelfile instructions are covered in detail in the dedicated guide.
#ollama cp: copy or rename
The copy shares the same files as the original (same ID in ollama list). It's mainly useful for keeping a stable name in your scripts or UI, or for freezing a version before a ollama pull qui would replace it.
#Cheat sheet: every Ollama command at a glance
- ollama pull <model>
- Download or update a model from the library.
- ollama run <model> ["question"]
- Chat interactively, or ask a single question. Downloads the model if it's missing. --verbose for statistics.
- ollama list / ollama ls
- List the models on disk: name, ID, size, date.
- ollama ps
- List the models loaded in memory, how much memory they use, and the CPU/GPU split.
- ollama show <model>
- Model card; --parameters, --modelfile, --template, --system, --license.
- ollama stop <model>
- Unload a model from memory without deleting it.
- ollama rm <model>
- Delete a model from disk, without confirmation.
- ollama create <name> -f Modelfile
- Build a custom model; -q to quantize.
- ollama cp <source> <destination>
- Copy a model under another name.
- ollama serve
- Run the server in the foreground (useful for debugging).
- ollama push <user>/<model>
- Publish a model to ollama.com (account required).
- ollama help [command]
- General help or help for a specific command; equivalent to --help.
Recent versions add other commands, notably related to the ollama.com account and hosted models. They're outside the scope of this cheat sheet, which focuses on local use: ollama help lists them for your version.
#Troubleshooting common errors
- 01“could not connect to ollama app” or “connection refused”The server isn't running. Start the Ollama app (Windows, macOS) or the service (Linux: sudo systemctl start ollama), then try again. As a last resort, run ollama serve in a separate terminal to read the error messages.
- 02“model not found” or “file does not exist”The name doesn't match any installed model. Run ollama list and copy the exact name, including the tag: qwen2.5 means qwen2.5:latest, not qwen2.5:14b.
- 03ollama list est vide alors que des modèles ont été téléchargésThe client may be querying a different server or a different models folder: a different OLLAMA_HOST variable, a modified OLLAMA_MODELS, or Ollama installed twice (for example, the app and a Docker container). In a container, run the commands inside it: docker exec -it ollama ollama list.
- 04The model responds very slowlyRun ollama ps during generation. If the PROCESSOR column shows a CPU share, the model doesn't fit entirely in VRAM: unload other models with ollama stop, reduce num_ctx, or choose a smaller size or quantization.
- 05The disk is filling upReview everything with ollama list and remove unused models with ollama rm les. For tougher cases (orphaned files, a moved folder), see the maintenance guide.
#Go further
This cheat sheet covers the command line. Installation, maintenance, and advanced customization each have their own guide.
- Install Ollama
- Step-by-step installation on Windows, macOS, and Linux: https://quelllm.fr/guide/installer-ollama
- Updating, deleting, uninstalling
- Updates for each OS, reclaiming disk space, full uninstallation: https://quelllm.fr/guide/maintenance-ollama-update-supprimer
- Modelfile
- All the instructions for creating and customizing a model with ollama create: https://quelllm.fr/guide/ollama-modelfile-personnalisation
- Understanding Ollama
- What Ollama does, how it loads models, and who it's for: https://quelllm.fr/guide/ollama-debutant-c-est-quoi-comment-ca-marche
- Official sources
- CLI reference: https://docs.ollama.com/cli; code and release notes: https://github.com/ollama/ollama (not reviewed on November 16, 2026; see the warning at the top of the guide).
Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.