KemptDesk

Where do Ollama, LM Studio and Hugging Face store models, and how do you delete them?

For Mac and PCOllama, LM Studio 0.4 and the huggingface_hub hf CLI on macOS 13 Ventura and later, Windows 10 and Windows 11Reviewed 23 November 20267 min read

Quick answer

Local AI models sit in hidden folders in your home folder: Ollama uses ~/.ollama/models, LM Studio uses ~/.lmstudio/models, and Hugging Face uses ~/.cache/huggingface/hub. They are safe to remove if you accept a new download later. Remove them with each tool's own command, such as ollama rm <model>, not by deleting random files.

On this page
  1. Where the models are
  2. What is safe to delete
  3. How to remove models with each tool's own commands
  4. How to move the models to another disk
  5. How KemptDesk handles this
  6. Questions
  7. Sources

Where the models are

Each tool keeps models in a dot-folder in your home folder. On a Mac, ~ is /Users/<you>; on Windows, C:\Users\<you>.

Models you run in Docker or WSL live inside their virtual disk instead: see how to shrink a WSL or Docker disk.

If you do not know what fills your disk, start with what fills a Mac and what is safe to delete or what fills a Windows C: drive.

Ollama

  • Mac: ~/.ollama/models
  • Windows: C:\Users\%username%\.ollama\models

On Windows, %HOMEPATH%\.ollama holds models and configuration, %LOCALAPPDATA%\Ollama holds logs and updates, and %LOCALAPPDATA%\Programs\Ollama holds the program.

LM Studio

  • Mac: ~/.lmstudio/models
  • Windows: the .lmstudio\models folder in your user folder

The My Models tab in LM Studio shows the exact folder. Older versions can use a different folder, so check it there.

LM Studio keeps the Hugging Face layout: models/<publisher>/<model>/<file>.gguf. The same .lmstudio folder also holds your chats (conversations) and presets (config-presets), so do not delete the whole folder.

Hugging Face

  • Mac: ~/.cache/huggingface/hub
  • Windows: C:\Users\<you>\.cache\huggingface\hub

The parent folder is HF_HOME, which defaults to ~/.cache/huggingface. It holds more than models: your Hugging Face sign-in token, the Xet cache (xet) and the assets cache (assets).

KemptDesk Hidden space list with the .ollama and .cache/huggingface folders marked Check first, each with its size and a short explanation
Hidden space in KemptDesk

What is safe to delete

PathWhat it isSafe to deleteWhat happens if you delete itHow to clean it
~/.ollama/modelsOllama model files (blobs and manifests)CarefulThe models are gone and must be downloaded again.ollama rm <model> for each model you do not use
~/.ollama (the whole folder)Ollama models and configurationCarefulYou lose all models and Ollama's settings and keys.Remove models with ollama rm; leave the folder
%LOCALAPPDATA%\OllamaOllama logs and downloaded updates (Windows)YesOld logs and update files are gone. Quit Ollama first.Delete old files in File Explorer
%LOCALAPPDATA%\Programs\OllamaThe Ollama program (Windows)NoOllama stops working.Settings › Apps › Installed apps › Ollama › Uninstall
~/.lmstudio/modelsLM Studio model filesCarefulLM Studio must download the models again.Remove one <publisher>/<model> folder at a time
~/.lmstudio (the whole folder)LM Studio models, chats and presetsNoYour chats and presets are lost.Clean only models
~/.cache/huggingface/hubHugging Face model and dataset cacheCarefulScripts download the files again the next time they run.hf cache rm or hf cache prune
~/.cache/huggingface (the whole folder)HF_HOME: cache, token, Xet and assets cachesCarefulYou are signed out of Hugging Face and all cached models are gone.Clean hub with hf cache; keep the token

How to remove models with each tool's own commands

Each tool knows which files belong to which model, so use its own command first.

Ollama

  1. Open Terminal (Mac) or PowerShell (Windows).
  2. List the models on your computer. The short form is ollama ls.
bash
ollama list
  1. Check that the model is not running, and stop it if it is.
bash
ollama ps
ollama stop gemma4
  1. Remove the model. This command deletes the model's files from disk.
bash
ollama rm gemma4

Use the name that ollama list shows.

LM Studio

  1. Open LM Studio and select the My Models tab. It shows the models folder and your models.
  2. If My Models shows a delete option for a model you do not use, use it.
  3. If there is no delete option, quit LM Studio, open the models folder, and move one <publisher>/<model> folder to the Trash or Recycle Bin.
  4. Check the result: lms ls lists the models on disk.
bash
lms ls

The lms docs list no command that deletes a model from disk. lms unload only frees memory.

Hugging Face

The current command line tool is hf. It comes with pip install -U "huggingface_hub", and the Hugging Face CLI guide lists other installers.

  1. List what is in the cache, with sizes.
bash
hf cache ls
hf cache ls --sort size:desc --limit 10
  1. Preview a removal. --dry-run deletes nothing.
bash
hf cache rm model/bert-base-cased --dry-run
  1. Remove the model. This command deletes every cached file of that repository.
bash
hf cache rm model/bert-base-cased
  1. Remove leftovers. This command deletes old unreferenced revisions, unfinished .incomplete downloads and blobs that no cached repository uses.
bash
hf cache prune --dry-run
hf cache prune

Update huggingface_hub before you use hf cache rm or hf cache prune. Hugging Face says that older clients can delete a shared file that another repository still uses.

How to move the models to another disk

Moving the models to a second drive frees the system disk without a new download.

Ollama: OLLAMA_MODELS

On Windows:

  1. Quit Ollama from the taskbar.
  2. Open Settings and search for "environment variables". Select Edit environment variables for your account.
  3. Create the variable OLLAMA_MODELS and set it to the new folder, for example D:\ollama-models.
  4. Click OK, then start Ollama from the Start menu.

On a Mac, Ollama's FAQ says to set variables for the Ollama app with launchctl, then restart the app.

zsh
launchctl setenv OLLAMA_MODELS "/Volumes/External/ollama-models"

Ollama then looks only in the new folder. Pull the models again with ollama pull, then delete the old models folder. If you uninstall Ollama later on Windows, the uninstaller does not remove models in a changed location.

LM Studio: models directory

Open the My Models tab and change the models directory there. Move the existing <publisher>/<model> folders to the new folder so LM Studio finds them.

Hugging Face: HF_HOME or HF_HUB_CACHE

HF_HOME moves the whole Hugging Face folder; HF_HUB_CACHE moves only the model cache. Set them before your script starts.

On a Mac, add the line to ~/.zshrc, then open a new Terminal window:

zsh
export HF_HOME="/Volumes/External/huggingface"

On Windows, run this once, then open a new PowerShell window:

powershell
setx HF_HOME "D:\huggingface"

How KemptDesk handles this

KemptDesk shows ~/.ollama, ~/.cache/huggingface, ~/.lmstudio and ~/.cache/lm-studio under Hidden space, each with its size and an explanation. All four are marked Check first (amber): KemptDesk never selects them for you, and the one-click "Clean recommended" action leaves them out. For Ollama, KemptDesk suggests ollama rm <name>.

KemptDesk does not list single models inside these folders, and it does not read OLLAMA_MODELS or HF_HOME. A models folder in another place is treated as your files. Inside .ollama, model files are locked in Space Lens unless you turn on expert mode.

Questions

Can I just delete the .ollama folder?

You can, but you lose every model and Ollama's configuration. Run ollama list first and remove only the models you do not use with ollama rm.

Why is my Hugging Face cache so big when I only downloaded one model?

The cache keeps every revision you downloaded, and on Windows without symlinks the same file can be stored more than once. Run hf cache ls --revisions to see them, then hf cache prune to remove the old ones.

Do I lose my models if I uninstall Ollama or LM Studio?

Not always. On Windows, Ollama's docs say the uninstaller does not remove models in a changed OLLAMA_MODELS location. Check the models folder after you uninstall and delete it if you no longer need it.

Sources

See what is safe to delete on your computer

KemptDesk scans your disk, explains every folder and selects only what apps can rebuild. The scan is free and cleans up to 500 MB. No account.

Then pay once from $59 or yearly from $9.99 for the first year until 31 December 2026, then $24.99. One license covers Macs and PCs. See plans