ApiaryActiveLive
Try: pause · settings · learn · wipe
← Community / Reading Room
HT
craft · 18 min read

How to Stop Ollama From Running in the Background When You Do Not Need It

There are three different things people mean by "stop Ollama," and it helps to keep them apart:

By Austin Little

You tried a local AI model last week, liked it, closed the chat window, and moved on. Then you noticed a little llama icon still sitting in your menu bar or system tray, or your laptop fan spun up for no reason, or someone told you "Ollama is always running." None of that means something is wrong. Ollama is designed to wait in the background so it can answer fast. But you get to decide when it runs. This guide walks through the three levels of "off," from the gentlest to the most complete, on Mac, Windows, and Linux.

AI disclosure. This page was drafted with AI assistance and edited for Apiary. Facts that need a live check are marked. We don't invent quotes, stats, people, or events.

The short answer

There are three different things people mean by "stop Ollama," and it helps to keep them apart:

  1. Unload the model. The Ollama program keeps running, but the AI model is cleared out of memory. This frees most of the RAM or graphics memory. One command does it: ollama stop <model name>.
  2. Quit Ollama for now. The whole program stops until you open it again or restart your computer. On Mac and Windows you quit it from the menu bar or tray icon. On Linux you stop the service.
  3. Stop it from starting automatically. Ollama won't launch at login anymore. You start it yourself when you want it. On Mac you turn off its Login Item, on Windows you disable it in Task Manager's startup list, and on Linux you disable the systemd service.

Most people only need level 1 or level 3. Level 2 is for "I need my computer back right now."

If you're thinking about getting rid of Ollama entirely, that's a different job. See our companion guide, How to Uninstall Ollama or LM Studio Completely.

Why Ollama runs in the background at all

Ollama isn't just a chat window. It's a small server: a program that waits for requests and answers them. When you type into a chat app, use a plugin, or run ollama run in a terminal, those are all clients knocking on the server's door. The server is what actually loads the model and does the thinking.

That design is why the Ollama Windows page says that after installing, "Ollama will run in the background," with its API served on http://localhost:11434. Apps like Open WebUI, coding extensions, and note-taking plugins expect that door to be open whenever they need it. If you're curious what "localhost" means here, our explainer What Is a Local AI API and Why Apps Ask for Localhost covers it.

There's also a second, separate behavior: keeping a model warm. According to the Ollama FAQ, models are kept in memory for 5 minutes by default after you use them, so your next question doesn't have to wait for the model to load again. After that, Ollama unloads the model on its own.

So an "idle" Ollama has two possible states:

  • Server running, no model loaded. This is usually light. The program is waiting, but the big model file isn't sitting in memory.
  • Server running, model loaded. This is where memory use is real, because the model is held in RAM or on your graphics card, ready to go.

Knowing which state you're in tells you which fix you need.

Step one: check what's actually running

Before switching anything off, look. The quickest check is a terminal command, and it works the same on Mac, Windows, and Linux.

Open a terminal (Terminal on Mac, PowerShell or Command Prompt on Windows, any terminal on Linux) and type:

ollama ps

The Ollama CLI reference lists this as the command to "List running models." The FAQ shows what the output looks like: a table with the model's name, its size, a PROCESSOR column, and an UNTIL column.

How to read it:

  • An empty table (just the headings) means the server is running but no model is loaded. Memory use from Ollama is small at this point.
  • A row with a model name means that model is sitting in memory. The UNTIL column tells you when Ollama plans to unload it on its own, for example "4 minutes from now."
  • The PROCESSOR column says where the model lives. The FAQ explains that 100% GPU means it's entirely on the graphics card, 100% CPU means it's in regular system memory, and a split like 48%/52% CPU/GPU means it's spread across both.

If instead you get an error that the command can't connect, the server isn't running at all. Nothing to stop.

If you'd rather not use a terminal, you can look for Ollama in your system's process list: Activity Monitor on a Mac, Task Manager on Windows. You'll usually see one or more entries with "ollama" in the name. <!-- NEEDS_FOUNDER_EYEBALL: exact process names shown in Activity Monitor / Task Manager for current Ollama builds not verified today. -->

A worked example

Say you asked a model called llama3.2 to summarize a recipe two minutes ago. You run ollama ps and see one row: llama3.2, PROCESSOR 100% GPU, UNTIL "3 minutes from now."

That tells you three things. The model is loaded. It's using your graphics memory. And if you do nothing, Ollama will clear it out in about three minutes anyway. If you're about to start a game or a video export and need that graphics memory now, you unload it yourself. If not, you can simply wait.

Level 1: unload a model without quitting Ollama

This is the gentlest option and often the only one you need. The CLI reference lists it as "Stop a running model":

ollama stop llama3.2

Swap in whatever name ollama ps showed you. The FAQ describes ollama stop as the way to "immediately unload a model from memory."

Run ollama ps again afterward. The table should be empty.

What this does and doesn't do:

  • It does free the memory the model was using.
  • It doesn't delete the model. It's still on your disk, and ollama run llama3.2 will load it again.
  • It doesn't quit Ollama. The server keeps waiting for the next request.

That last point matters if you use apps that talk to Ollama. Open WebUI, a VS Code extension, or a browser add-on can still reach the server and will load a model again the moment you ask them something.

Make models unload sooner, every time

If you find yourself running ollama stop constantly, you can change how long Ollama keeps models warm. The FAQ describes a setting called OLLAMA_KEEP_ALIVE. It accepts:

  • a duration like "10m" or "24h",
  • a number of seconds like 3600,
  • 0, which unloads the model right after it finishes answering,
  • or a negative number, which keeps it loaded indefinitely.

So setting OLLAMA_KEEP_ALIVE to 0 tells Ollama, "Don't hang on to the model between questions." The trade-off is speed: each new question will have to load the model again, which can take a noticeable moment on slower machines.

A middle-ground value like 1m keeps the model around long enough for a quick back-and-forth conversation, then lets it go.

How to set it depends on your system. The FAQ walks through each one:

  • Mac (when Ollama runs as the regular app): use launchctl setenv for the variable, then restart the Ollama app. For example: launchctl setenv OLLAMA_KEEP_ALIVE "1m".
  • Windows: quit Ollama from the taskbar, open Settings and search for "environment variables," choose Edit environment variables for your account, add OLLAMA_KEEP_ALIVE with your value, then start Ollama again from the Start menu.
  • Linux (when Ollama runs as a systemd service): run systemctl edit ollama.service, add a line Environment="OLLAMA_KEEP_ALIVE=1m" under [Service], save, then run systemctl daemon-reload and systemctl restart ollama.

One wrinkle the FAQ points out: an app can send its own keep_alive value with each request, and that overrides your server-wide setting. So if a particular chat app keeps models loaded longer than you expect, check that app's settings too. <!-- NEEDS_FOUNDER_EYEBALL: whether Open WebUI and other popular front ends send their own keep_alive by default, and where that setting lives in their menus, not verified today. -->

Unload from a script or app

If you're comfortable with a terminal command, the FAQ also shows how to unload a model by sending a request with keep_alive set to 0:

curl http://localhost:11434/api/generate -d '{"model": "llama3.2", "keep_alive": 0}'

You won't usually need this. It's handy if you want a desktop shortcut or a little script that clears memory with one click.

Level 2: quit Ollama completely for now

Sometimes you want Ollama gone until you decide to bring it back. Maybe you're on battery, running a heavy program, or just like a tidy computer.

On a Mac

When you install Ollama on a Mac as the regular app, it shows an icon in the menu bar at the top of the screen. Click it and choose the quit option. <!-- NEEDS_FOUNDER_EYEBALL: exact wording of the quit item in the current macOS menu bar menu not verified today. -->

Once it's quit, ollama ps in Terminal should fail to connect. That's what you want.

If the icon doesn't appear but Ollama still seems to be running, open Activity Monitor, search for "ollama," select it, and use the stop button to quit it. Try a normal Quit before Force Quit.

On Windows

The Ollama Windows page and FAQ both refer to quitting the tray application. Look in the system tray, the small icons near the clock at the bottom right. You may need to click the little up arrow to see hidden icons. Right-click or click the Ollama icon and choose to quit. <!-- NEEDS_FOUNDER_EYEBALL: exact tray menu wording on current Windows build not verified today. -->

If you can't find the icon, open Task Manager (press Ctrl + Shift + Esc), find the Ollama entries on the Processes tab, and choose End task.

On Linux

On Linux, the standard install sets Ollama up as a background service managed by systemd. The Ollama Linux page shows the service commands. To stop it for now:

sudo systemctl stop ollama

To check its state:

sudo systemctl status ollama

It should report that the service is inactive. To start it again later:

sudo systemctl start ollama

Stopping the service this way lasts until you restart the computer. If the service is still "enabled," it will come back at the next boot. That's level 3.

If you didn't use the standard installer and instead started Ollama yourself with ollama serve in a terminal, the CLI reference lists that as the command to start it. In that case, stopping it is simply a matter of going to that terminal window and pressing Ctrl + C, or closing the window.

Level 3: stop Ollama from starting at login

This is the setting most people are really after. You still want Ollama on your computer. You just don't want it waking up every time you log in.

The Ollama FAQ is direct about it: "Ollama for Windows and macOS register as a login item during installation." It also says Ollama will respect your choice to disable that "across upgrades, unless you uninstall the application." So you only need to do this once, unless you remove and reinstall Ollama.

On a Mac

The FAQ's steps: open Settings, search for "Login Items," find the Ollama entry under Allow in the Background, and click the slider to turn it off.

A couple of notes:

  • On recent versions of macOS this lives in System Settings, under General, then Login Items & Extensions or a similar name depending on your version. Searching for "Login Items" in the settings search box is the fastest route. <!-- NEEDS_FOUNDER_EYEBALL: exact macOS System Settings path name varies by macOS version; not verified on current release today. -->
  • Turning off the background permission stops Ollama from launching itself. It doesn't delete anything. When you want Ollama, open it from your Applications folder.

On Windows

The FAQ's steps: open Task Manager, go to the Startup apps tab, search for "ollama," and click Disable.

On Windows 11 you can also find startup programs in Settings, under Apps, then Startup. <!-- NEEDS_FOUNDER_EYEBALL: Windows 11 Settings > Apps > Startup path not verified today against current Windows build. --> Either route works. Task Manager is the one Ollama's own FAQ names.

After this, start Ollama when you want it from the Start menu, exactly as the Windows instructions describe.

On Linux

On Linux the standard setup uses systemctl enable ollama to make the service start with the system, as shown on the Ollama Linux page. The reverse is:

sudo systemctl disable ollama

That stops it from starting at boot. It doesn't stop a copy that's already running, so if you want both, run:

sudo systemctl stop ollama
sudo systemctl disable ollama

When you want Ollama back for a session:

sudo systemctl start ollama

And if you change your mind and want it to start at boot again:

sudo systemctl enable ollama

Which level should you pick?

Here's a plain way to decide.

You use local AI most days. Leave Ollama running and starting at login. If memory gets tight now and then, use ollama stop to unload a model, or set OLLAMA_KEEP_ALIVE to something short like a minute.

You use local AI once or twice a week. Turn off the login item (level 3). Open Ollama when you want it, quit it when you're done. This is the setup I'd suggest for most people with a laptop.

You share the computer with family. Turn off the login item so Ollama isn't quietly running under someone else's session, and show the person who uses it how to open and quit it. Our guide How to Share One Local AI Server Across the House Safely covers the bigger picture if several people use it.

You run a home AI box that other devices talk to. Keep it running. That's the job. Focus instead on making sure it's only reachable by the devices you intend. Our companion piece Is Your Ollama Server Open to the Internet? How to Check and Lock It Down walks through that.

You're on battery and want every minute. Quit Ollama completely when you're not using it. Our guide How to Run Local AI on a Laptop Without Draining the Battery has more.

Common situations and what to do

"I quit Ollama, but it came back."

Usually one of three things is happening:

  1. It started at login. You quit it, then restarted your computer, and the login item launched it again. Fix: level 3 above.
  2. An app started it. Some apps that use Ollama may try to launch it if it isn't running. Check the app's settings for an option to start or connect automatically. <!-- NEEDS_FOUNDER_EYEBALL: which common front ends auto-launch Ollama is not verified today. -->
  3. On Linux, the service restarted. The service file in the Ollama Linux instructions includes Restart=always, which tells systemd to bring Ollama back if it stops unexpectedly. Killing the process by hand won't keep it down. Use sudo systemctl stop ollama instead, which tells systemd you meant it.

"My fan is loud, but ollama ps shows nothing loaded."

Then Ollama probably isn't the cause. With no model loaded, the server is just waiting. Look at your system's process list to see what's really using the processor. A browser tab, a video call, or a backup app are more common culprits.

One exception: if Ollama is downloading a model or an update, it may be busy with network and disk work. The FAQ notes that Ollama on Mac and Windows downloads updates automatically. Let it finish, then check again.

"I ran ollama stop and it said the model wasn't found."

Check spelling against what ollama ps shows, including any tag after a colon. A model listed as qwen3:8b needs ollama stop qwen3:8b, not just qwen3. When in doubt, copy and paste the name from the ollama ps output.

"I set OLLAMA_KEEP_ALIVE and nothing changed."

Three common reasons:

  • Ollama wasn't restarted. Environment variables are read when Ollama starts. The FAQ's instructions for every platform end with restarting Ollama.
  • The variable went to the wrong place. On a Mac, setting it in a Terminal profile file doesn't reach the menu bar app. The FAQ specifies launchctl setenv for the app. On Linux with systemd, it has to go in the service settings, not your personal shell.
  • An app is overriding it. As noted above, a keep_alive value sent by an app with each request beats the server setting.

"Is it bad to leave Ollama running?"

Not inherently. It's built to run in the background, and with no model loaded it's mostly just waiting. The things worth caring about are:

  • Memory, when a model is loaded and you need that memory for something else.
  • Battery, on a laptop, if models load and unload often.
  • Network exposure, which matters only if someone has changed Ollama's address settings. By default, the FAQ says Ollama binds to 127.0.0.1 port 11434, which means only your own computer can reach it.

That last one is worth a quick look if you followed any guide that told you to set OLLAMA_HOST to 0.0.0.0. That setting opens Ollama up to other devices on your network. If you don't need that, our lock-it-down guide shows how to put it back.

"I don't want Ollama's cloud features either."

That's a separate switch from "running in the background." The FAQ describes a local-only mode: set "disable_ollama_cloud": true in ~/.ollama/server.json, or set the environment variable OLLAMA_NO_CLOUD=1, then restart Ollama. The FAQ says you'll lose access to Ollama's cloud models and web search when you do this, and that the logs will show Ollama cloud disabled: true once it's working.

A short routine for occasional users

If you only use local AI now and then, this is a tidy routine.

One-time setup:

  1. Turn off Ollama's login item (Mac: Login Items; Windows: Task Manager → Startup apps; Linux: sudo systemctl disable ollama).
  2. Optionally set OLLAMA_KEEP_ALIVE to something short, like 2m, so models don't linger.

Each time you want to use it:

  1. Open Ollama from Applications (Mac), the Start menu (Windows), or sudo systemctl start ollama (Linux).
  2. Use your chat app or ollama run as normal.
  3. When you're done, run ollama ps. If a model is listed and you need the memory, run ollama stop with its name.
  4. Quit Ollama from the menu bar or tray, or run sudo systemctl stop ollama on Linux.

That's it. Nothing is deleted, nothing needs to be re-downloaded, and Ollama is only awake when you've asked it to be.

Asking an AI to help with this

It's perfectly reasonable to ask a free chatbot, or your own local model, to help you through these steps. Some prompts that work well:

To understand your ollama ps output:

Here's the output of ollama ps on my computer. Explain each column in plain English and tell me whether a model is currently loaded: [paste output]

To get the right steps for your system:

I'm on [Windows 11 / macOS / Ubuntu]. I installed Ollama with [the regular installer / the install script]. Walk me through stopping it from starting at login, one step at a time, and tell me how to confirm it worked. Don't suggest deleting anything.

To check a setting you found online:

A guide told me to set OLLAMA_HOST to 0.0.0.0. In plain English, what does that change, and what are the risks on a home network?

Two cautions. First, menus and settings names change between operating system versions, and a chatbot may describe an older layout. If its steps don't match what you see, trust your screen and the official Ollama docs. Second, be wary of any answer that tells you to delete folders, edit system files, or paste long commands you don't understand. Ask it to explain each command first. AI explains, it doesn't decide; you're the one at the keyboard.

Quick reference

What you wantMacWindowsLinux
See what's loadedollama psollama psollama ps
Unload a modelollama stop <name>ollama stop <name>ollama stop <name>
Quit for nowMenu bar icon → quitTray icon → quitsudo systemctl stop ollama
Stop auto-startSettings → Login Items → Ollama offTask Manager → Startup apps → Disablesudo systemctl disable ollama
Start againOpen from ApplicationsOpen from Start menusudo systemctl start ollama
Unload sooner by defaultOLLAMA_KEEP_ALIVE via launchctl setenvOLLAMA_KEEP_ALIVE in account environment variablesOLLAMA_KEEP_ALIVE via systemctl edit ollama.service

All commands above come from Ollama's own CLI reference, FAQ, and Linux page. Menu wording on Mac and Windows may differ slightly on your version.

Common questions

Does ollama stop delete my model? No. It only unloads the model from memory. To remove a model from your disk, the CLI reference lists a separate command, ollama rm <name>. Our guide How to Free Up Disk Space Used by Old Ollama Models covers that.

Will turning off the login item break my chat apps? Only while Ollama is closed. Apps that rely on Ollama, such as Open WebUI, will show a connection error until you start Ollama again. Start it, refresh the app, and they'll reconnect.

How long does Ollama keep a model loaded if I do nothing? The Ollama FAQ says 5 minutes by default. You can change that with OLLAMA_KEEP_ALIVE, and individual apps can override it per request.

Is there a way to keep a model loaded all the time? Yes. The FAQ says a negative value for keep_alive or OLLAMA_KEEP_ALIVE, such as -1, keeps the model in memory indefinitely. That's useful on a dedicated home AI box, not usually on a laptop you use for other things.

Do I need to stop Ollama before updating it? On Mac and Windows, the FAQ says Ollama downloads updates automatically and you apply them with "Restart to update" from the menu bar or taskbar item. On Linux you re-run the install script. You don't need to stop it by hand first.

I disabled the login item and then reinstalled. Why is it back? The FAQ says Ollama respects your choice across upgrades "unless you uninstall the application." A fresh install registers the login item again, so turn it off once more.

Bottom line

Ollama runs in the background because it's a small server that other apps rely on, and it keeps models warm for 5 minutes by default so answers come quickly. You have three levels of control: unload the model with ollama stop, quit the program from the menu bar, tray, or systemctl, or turn off its automatic start so it only runs when you open it. For most occasional users, turning off the login item and quitting when done is the sweet spot. Nothing gets deleted, nothing costs money, and your computer stays yours.

Related on Apiary

References

  • Ollama FAQ: https://docs.ollama.com/faq (fetched 2026-10-08)
  • Ollama CLI Reference: https://docs.ollama.com/cli (fetched 2026-10-08)
  • Ollama on Linux: https://docs.ollama.com/linux (fetched 2026-10-08)
  • Ollama on Windows: https://docs.ollama.com/windows (fetched 2026-10-08)
  • Ollama on macOS: https://docs.ollama.com/macos (fetched 2026-10-08)
Frequently asked
What is How to Stop Ollama From Running in the Background When You Do Not Need It about?
There are three different things people mean by "stop Ollama," and it helps to keep them apart:
What should you know about the short answer?
There are three different things people mean by "stop Ollama," and it helps to keep them apart:
What should you know about why Ollama runs in the background at all?
Ollama isn't just a chat window. It's a small server : a program that waits for requests and answers them. When you type into a chat app, use a plugin, or run ollama run in a terminal, those are all clients knocking on the server's door. The server is what actually loads the model and does the thinking.
What should you know about step one: check what's actually running?
Before switching anything off, look. The quickest check is a terminal command, and it works the same on Mac, Windows, and Linux.
What should you know about a worked example?
Say you asked a model called llama3.2 to summarize a recipe two minutes ago. You run ollama ps and see one row: llama3.2 , PROCESSOR 100% GPU , UNTIL "3 minutes from now."
References & sources
  1. Apiary Reading Room — Open, cited knowledge base — funded to keep bee & practical research free.
From the Apiary Reading Room. Opinion & editorial — not financial advice. We don't overclaim.
More from the Reading Room