cd /news/ai-tools/how-to-clean-up-ollama-and-lm-studio… · home › topics › ai-tools › article
[ARTICLE · art-161331] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

How to Clean Up Ollama and LM Studio Models Taking Up Space on Linux in 2026

Off Grid AI Desktop, a Linux app distributed as a .deb package and AppImage, scans the model folders used by LM Studio (~/.lmstudio/models) and Ollama (~/.ollama/models and /usr/share/ollama/.ollama/models) to list every downloaded GGUF chat and vision model with its size in one place. LM Studio models can be moved to the desktop Trash for later restore, while Ollama models are left untouched because they are stored as hash-named blobs shared across tags; the app instead surfaces the exact `ollama rm` command to run. Models in use are protected from deletion until the user switches to another model.

by read5 min views2 publishedOct 31, 2026

df -h says your home partition is almost full, and du points at two hidden folders: ~/.lmstudio and ~/.ollama. Every model you tried in LM Studio or pulled with Ollama is still there, several gigabytes each, and neither app shows the other's models. Off Grid AI Desktop lists them all in one place with their sizes and lets you remove the ones you no longer use. LM Studio files go to your desktop's Trash, so you can still restore one. Ollama models stay under Ollama's control, and the app tells you the command that removes them without breaking Ollama.

.deb package for amd64.ollama command in your terminal, which Ollama's install script adds. To install the .deb on Ubuntu or Debian, run sudo apt install ./off-grid-ai_0.0.55_amd64.deb in the folder you downloaded it to. For the AppImage, run chmod +x off-grid-ai-0.0.55.AppImage once, then start it.

When you open the Models screen, the app reads these folders:

~/.lmstudio/models, up to four folder levels deep. Folders whose names start with a dot are skipped.~/.ollama/models, which is where models go when you run ollama serve as yourself./usr/share/ollama/.ollama/models. Ollama's Linux install script runs Ollama as a systemd service under its own OLLAMA_MODELS environment variable, if it is set when you start Off Grid AI. The app reads Ollama's manifests to find which blob file holds each model. It lists chat and vision models in GGUF format. Image, video, speech and embedding weights are left out. Nothing is copied or moved.

To see the size of each folder yourself:

du -sh ~/.lmstudio/models ~/.ollama/models
sudo du -sh /usr/share/ollama/.ollama/models

Every external card has a Use button. Off Grid AI runs the model straight from LM Studio's or Ollama's folder, so a model you keep does not need a second copy on disk. If you still use LM Studio for one model and Off Grid AI for the rest, both apps share that one file.

The models worth removing are usually the old ones: the first 7B you tried, three quantizations of the same model, or a model that a newer release replaced.

Move "Qwen 3.5 9B" to the Trash? Its files are in another app's folder; you can restore them from the Trash.

The app uses your desktop's standard Trash, the same one GNOME Files, Dolphin and other file managers show. For a file in your home folder, that is ~/.local/share/Trash. If it is a vision model, its projector file goes with it. The card leaves the On this device list.

You cannot remove the model you are using right now. Its trash icon is greyed out and the tooltip reads Switch to another model before deleting. Click Use on another model first.

If you already deleted the file in LM Studio, the app says "This model is no longer in that folder." instead of guessing.

A file in the Trash still takes up space on its drive. To free it:

From a terminal, gio trash --empty does the same on GNOME-based desktops.

Changed your mind before emptying it? In the Trash, right-click the file and choose Restore From Trash (GNOME Files) or Restore (Dolphin). It returns to LM Studio's folder, and Off Grid AI lists it again the next time you open the Models screen.

Ollama stores models as shared blobs named by hash. One blob can belong to several tags, and a manifest tracks which tag uses which blob. Running rm on a blob can break other models in Ollama. So Off Grid AI does not delete Ollama's files. When you click the trash icon on an Ollama model, the app answers with a message that starts "Ollama manages this model. Remove it with: ollama rm".

To remove it:

ollama list to see the exact name and size of each model, for example qwen3:8b. ollama rm qwen3:8b with the name from that list. Use the name from ollama list, not the name on the card. The card shows a cleaned-up name such as "Qwen3 8B", and Ollama expects its own name with the colon. The ollama command talks to the running Ollama server, so you do not need sudo, even for the system service. Ollama deletes the blobs that no other model uses, and the space comes back at once. There is no Trash step.

Many Linux setups keep models on a second disk, such as /mnt/data/models, or point Ollama at one through OLLAMA_MODELS in its systemd unit. Off Grid AI does not read a variable set only inside a systemd unit, so add that folder by hand:

GGUF files in that folder show on the Text tab the same way, and the trash icon sends them to the Trash. If you add an Ollama models folder, the app reads its manifests and lists those models as Ollama, with the same ollama rm advice.

Where does LM Studio store models on Linux?

In ~/.lmstudio/models, which is /home/<your name>/.lmstudio/models. The folder is hidden, so press Ctrl+H in your file manager to see it. If you picked another folder in LM Studio's settings, the models are there instead.

Where does Ollama store models on Linux?

If you installed Ollama with its install script and it runs as a systemd service, in /usr/share/ollama/.ollama/models. If you run ollama serve as your own user, in ~/.ollama/models. Either way, OLLAMA_MODELS overrides the location when it is set.

Can I delete files in the Ollama blobs folder by hand?

No. One blob can be shared by several tags, and the manifests point to blobs by hash, so deleting the wrong one breaks those models. Use ollama rm with the name from ollama list.

Why did my free space not go up after I removed an LM Studio model?

The file is in the Trash, and the disk still counts it. Empty the Trash in your file manager, or run gio trash --empty, and df -h shows the space back.

Can I use my LM Studio and Ollama models in Off Grid AI without down them again?

Yes. They appear on the Models screen with a Use button, and the app runs them from their current folder. This applies to GGUF chat and vision models.

Does removing a model in Off Grid AI also remove it from LM Studio?

Yes. The file leaves LM Studio's models folder, so LM Studio no longer has it. If you restore it from the Trash, both apps see it again.

── more in #ai-tools 4 stories · sorted by recency
── more on @off grid ai desktop 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-clean-up-olla…] indexed:0 read:5min 2026-10-31 · —