Running models on your own computer is easy now, and each try leaves a file of 2 to 40 GB behind. A few weeks of testing Llama, Qwen and Mistral in Ollama, a couple of GGUF files in LM Studio, and a Python notebook that pulled Whisper and a Hugging Face model, and 100 GB are gone. None of these tools deletes a model on its own.
Each tool keeps its models in its own folder, and the paths are the same on a Mac and on Ubuntu unless noted. Start by measuring them all at once:
du -sh ~/.ollama/models ~/.lmstudio/models ~/.cache/lm-studio/models \
~/.cache/huggingface ~/.cache/whisper ~/.cache/torch ~/.keras 2>/dev/null | sort -h
Then go through the sections below. A model you delete can be downloaded again; the cost is the download time and, for a model you built yourself, rebuilding it.
Ollama
Ollama stores models in ~/.ollama/models, or in the folder the OLLAMA_MODELS variable points to. On Ubuntu, when Ollama was installed with its install script and runs as a system service, the models are in /usr/share/ollama/.ollama/models instead.
Always delete through Ollama itself:
ollama list
ollama rm llama3.2:latest
Don’t delete files in blobs/ by hand: models share layers, and a blob that looks unused may belong to another model. ollama rm removes the model’s manifest and only the layers no other model needs.
An interrupted ollama pull leaves a partial file behind, which can be several GB:
ls -lh ~/.ollama/models/blobs/*-partial* 2>/dev/null
Pulling the same model again resumes it. If you no longer want that model, quit Ollama and delete those -partial files.
LM Studio
LM Studio keeps downloaded models in ~/.lmstudio/models (older versions: ~/.cache/lm-studio/models), one folder per publisher and model. If you moved the folder in My Models, they are where you chose.
du -sh ~/.lmstudio/models/*/* 2>/dev/null | sort -h
Delete a model from My Models in the app, or quit LM Studio and delete the publisher/model folder. Download it again from the Discover tab.
Hugging Face
The transformers, diffusers and datasets libraries, and many apps built on them, download into the Hugging Face cache: ~/.cache/huggingface/hub (or HF_HOME / HF_HUB_CACHE). Each repo is a folder such as models--meta-llama--Llama-3.2-1B or datasets--squad.
The Hugging Face CLI lists the cache and removes what you pick:
huggingface-cli scan-cache
huggingface-cli delete-cache
delete-cache opens a list where you tick the repos or revisions to remove (newer versions of the CLI name these commands hf cache scan and hf cache delete). Without the CLI, deleting a whole models--… folder is safe too; leave ~/.cache/huggingface/token alone, it is your login.
Whisper, PyTorch Hub, sentence-transformers and Keras
Python libraries download models into their own caches:
ls -lh ~/.cache/whisper # openai-whisper: large-v3.pt is about 3 GB
ls -lh ~/.cache/torch/hub/checkpoints # torch.hub and torchvision weights
du -sh ~/.cache/torch/sentence_transformers/* # older sentence-transformers versions
du -sh ~/.keras/models ~/.keras/datasets # Keras applications and datasets
TORCH_HOME, XDG_CACHE_HOME, SENTENCE_TRANSFORMERS_HOME and KERAS_HOME move these folders. Each file or model folder can be deleted on its own while no Python program is using it; the library downloads it again on the next run. Leave ~/.keras/keras.json, it is your Keras configuration.
AI coding assistants
Claude Code, Codex, Cursor and similar tools don’t keep models on your disk, but they do keep every past session, plus caches and logs, which grow over months. Those are smaller than models, but worth a look in ~/.claude, ~/.codex and ~/.cursor. Delete old sessions only for projects you are done with: they are your history with the assistant.
How CleanMate does it
CleanMate puts models in their own group, on both systems, and never ticks a model for you: you choose each one. The AI models page sums up how it works on both systems.
- Ollama: each model on its own line by name, such as
llama3.2:latest, with its size and date. Removing one works likeollama rm: a layer other models share stays until the last of them is removed. Interrupted downloads are one more item. Skipped while Ollama runs. CleanMate looks in~/.ollama/modelsand theOLLAMA_MODELSfolder; on Ubuntu it does not touch the system service’s folder in/usr/share/ollama. - LM Studio: each model as
publisher/model, including a models folder you moved in My Models, skipped while LM Studio runs. - Hugging Face: each model folder (
models--…) of the hub cache, and on a Mac eachdatasets--andspaces--folder too; your token is never touched. - PyTorch, Whisper, sentence-transformers and Keras: each model file or folder on its own with its library, such as
large-v3 — Whisper; a file a program has open is skipped. - AI tools: caches, logs and old sessions of Claude Code, Codex, Cursor and other assistants, with the age you set in Settings; on a Mac old sessions go to the Trash.
See all features for macOS and Ubuntu, and how CleanMate compares with other cleaners, which mostly don’t list models one by one. For the rest of the developer junk, read the guides for Mac and Ubuntu, Docker and Xcode.
