Ollama: How to Download, Install, and Run Local AI Models

By

Robert Waithaka

·

· Updated

·

7 min read
Ollama is the easiest way to automate your work using open models, while keeping your data safe.

Ollama is a simple tool that lets you run AI models directly on your own computer. Instead of using only online tools such as ChatGPT, Claude, or Gemini, you can download open models and use them locally on Windows, macOS, or Linux.

This makes Ollama useful for students, writers, researchers, developers, and anyone who wants to learn how local AI works.

Key takeaways

  • Ollama lets you run local AI models on your computer.
  • It works on Windows, macOS, and Linux.
  • You can download Ollama models using simple terminal commands.
  • Ollama is especially useful for people who want a lightweight local AI tool.
  • Ollama vs LM Studio depends on what you prefer: commands and integrations, or a beginner-friendly visual interface.

What Is Ollama?#

Ollama is a local AI tool that helps you download, manage, and run large language models on your own computer. A large language model is the type of AI system that can answer questions, summarize text, write drafts, explain ideas, and help with coding.

In simple terms, Ollama gives your computer a way to run AI models without needing a complicated setup. You install Ollama, download a model, and then start chatting with it from your terminal or through another app that connects to Ollama.

How Ollama Works#

Ollama works by running a local server in the background. By default, this server is available on your computer at port 11434. Other apps can connect to it through an API.

This is useful because Ollama is not only a chat tool. It can also power other AI apps, coding tools, note-taking tools, and local AI interfaces. For example, some users connect Ollama to Open WebUI, VS Code extensions, Claude Code-style workflows, or custom Python apps.

When you run a model, Ollama loads it into your computer’s memory. Smaller models are faster and easier to run. Larger models usually give better answers but need more RAM, storage, and preferably a strong GPU.

How to Download and Install Ollama#

Windows#

Go to the official Ollama download page and choose Windows. You can install it using the normal installer, or you can use PowerShell:

irm https://ollama.com/install.ps1 | iex

Ollama supports Windows 10 or later. After installation, open PowerShell and type:

ollama

macOS#

On macOS, download the .dmg file from Ollama’s website. Open it, then drag Ollama into the Applications folder.

You can also use the command line:

curl -fsSL https://ollama.com/install.sh | sh

After starting the app, Ollama can add the command-line tool to your system path. This lets you use ollama directly in Terminal.

Linux#

On Linux, install Ollama with:

curl -fsSL https://ollama.com/install.sh | sh

After installation, you can start using Ollama from the terminal.

How to Run Ollama Models#

To run a model, use:

ollama run gemma4

If the model is not already downloaded, Ollama will pull it first. You can also download a model without running it:

ollama pull gemma4

To see installed Ollama models, run:

ollama ls

To see currently running models, run:

ollama ps

To stop a model, run:

ollama stop gemma4

Useful Ollama Commands#

Here are beginner-friendly commands worth knowing:

ollama run gemma4 — run a model
ollama pull gemma4 — download a model
ollama ls — list downloaded models
ollama rm gemma4 — remove an Ollama model
ollama ps — show running models
ollama stop gemma4 — stop a running model
ollama serve — start the Ollama server

Ollama is a simple tool that lets you run AI models directly on your own computer.

For the command to remove or delete a Ollama model, the answer is the same on Windows PowerShell or Linux Terminal:

ollama rm model-name

Example:

ollama rm gemma4

How to Fully Delete Ollama#

Uninstall on Windows#

On Windows, uninstall Ollama from Settings → Apps → Installed apps. If you changed the model storage location, you may need to delete the downloaded model folder manually.

Uninstall on Linux#

On Linux, stop and disable the service, remove the binary, and delete the model storage directory. The official Linux docs provide the detailed uninstall commands.

Remove the ollama service:

sudo systemctl stop ollama
sudo systemctl disable ollama
sudo rm /etc/systemd/system/ollama.service

Remove ollama libraries from your lib directory (either /usr/local/lib/usr/lib, or /lib):

sudo rm -r $(which ollama | tr 'bin' 'lib')

Remove the ollama binary from your bin directory (either /usr/local/bin/usr/bin, or /bin):

sudo rm $(which ollama)

Remove the downloaded models and Ollama service user and group:

sudo userdel ollama
sudo groupdel ollama
sudo rm -r /usr/share/ollama

Uninstall Ollama from macOS#

On macOS, remove the Ollama app from Applications and delete leftover model files by running these commands in your Terminal.

sudo rm -rf /Applications/Ollama.app
sudo rm /usr/local/bin/ollama
rm -rf "~/Library/Application Support/Ollama"
rm -rf "~/Library/Saved Application State/com.electron.ollama.savedState"
rm -rf ~/Library/Caches/com.electron.ollama/
rm -rf ~/Library/Caches/ollama
rm -rf ~/Library/WebKit/com.electron.ollama
rm -rf ~/.ollama

Ollama vs LM Studio#

Ollama and LM Studio both help users run local AI models, but they are designed differently.

Ollama is best if you like commands, automation, APIs, and integrations. It is lightweight and works well for developers or users who want to connect local AI models to other tools.

LM Studio is better if you want a visual interface. It is easier for beginners who prefer clicking, searching, downloading, and chatting inside one desktop app.

For most everyday beginners, LM Studio feels easier at first. For users who want local AI inside scripts, coding tools, or server workflows, Ollama is often the better choice.

Is Ollama free to use?

Yes. Ollama is completely free and open-source. You can download it from ollama.com, run it on Windows, macOS, or Linux, and use any compatible model without subscription fees or usage limits. The only costs are your own hardware and electricity for running the models locally.

Can Ollama run without an internet connection?

Yes. After downloading Ollama and your chosen models, everything runs fully offline on your own computer. Your conversations never leave your machine. This makes Ollama a strong choice for users who need privacy, want to work in restricted network environments, or prefer to avoid cloud-based AI services.

What models can I run with Ollama?

Ollama supports a wide range of open-source models including Llama 3, Mistral, Gemma, Phi, Qwen, and DeepSeek. You can browse available models at ollama.com/library. The models you can run effectively depend on your available RAM. An 8GB machine can run smaller models, while 16GB or more enables larger, more capable ones.

How much RAM does Ollama need?

Ollama itself has a minimal footprint, but the AI models it runs require significant RAM. A 7B parameter model typically needs around 6 to 8GB. A 13B model needs around 10 to 16GB. For the best experience with capable models, 16GB or more of system RAM is recommended. Apple Silicon Macs use unified memory and are particularly efficient.

Is Ollama safe to use?

Yes. Ollama is open-source with its code publicly available on GitHub for anyone to review. It runs entirely locally, so no data is sent to external servers during use. Download it only from the official website at ollama.com to avoid unofficial or modified versions.

Why I Recommend Ollama#

I recommend Ollama because it makes local AI practical. You do not need to understand every technical detail before getting started. You can install it, run one command, and test a model within minutes.

It is also useful for privacy. When you run local models, your prompts can stay on your own computer. However, this depends on whether you are using local models or cloud-hosted models.

The main limitation is hardware. Large models can be slow or may not run well on older computers. Beginners should start with smaller models before trying bigger ones.

Written to help beginners learn — general information, not professional advice. Verify anything important for your own situation.Editorial policy →

Who wrote this

Robert Waithaka

Robert Waithaka is an experienced project manager on Information Technology (IT) projects with over 5 years managing different software projects.