<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bytesweep</title>
    <description>The latest articles on DEV Community by Bytesweep (bytesweep).</description>
    <link>https://dev.to/bytesweep</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F16016%2Fd82efb4f-553c-4d6d-ac57-11f1305f0b22.png</url>
      <title>DEV Community: Bytesweep</title>
      <link>https://dev.to/bytesweep</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bytesweep"/>
    <language>en</language>
    <item>
      <title>Where Ollama stores models, and how to move or delete them</title>
      <dc:creator>Faheen Ahamed</dc:creator>
      <pubDate>Wed, 11 Nov 2026 08:26:07 +0000</pubDate>
      <link>https://dev.to/bytesweep/where-ollama-stores-models-and-how-to-move-or-delete-them-36le</link>
      <guid>https://dev.to/bytesweep/where-ollama-stores-models-and-how-to-move-or-delete-them-36le</guid>
      <description>&lt;p&gt;Ollama keeps every model you pull in one folder called &lt;code&gt;models&lt;/code&gt;, inside a hidden &lt;code&gt;.ollama&lt;/code&gt; folder. On a Mac and on Windows that folder is in your home directory. On Linux, if you used the official install script, it is in the home directory of a separate &lt;code&gt;ollama&lt;/code&gt; user, which is why &lt;code&gt;du&lt;/code&gt; on your own home finds nothing while the disk fills up.&lt;/p&gt;

&lt;p&gt;The space adds up quickly. &lt;code&gt;llama3.1:8b&lt;/code&gt; is 4.9 GB in Ollama's library and &lt;code&gt;llama3.1:70b&lt;/code&gt; is 43 GB, so trying out a few large models costs a hundred gigabytes or more, in a hidden folder the Finder does not show.&lt;/p&gt;

&lt;h2&gt;
  
  
  The paths
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Model store&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;macOS&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/.ollama/models&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;C:\Users\&amp;lt;you&amp;gt;\.ollama\models&lt;/code&gt;, or &lt;code&gt;%USERPROFILE%\.ollama\models&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux, official install script (systemd service)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/usr/share/ollama/.ollama/models&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux, &lt;code&gt;ollama serve&lt;/code&gt; run as yourself&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/.ollama/models&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Docker, official image&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/root/.ollama/models&lt;/code&gt; inside the container, kept in the volume you mount there&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are the defaults from &lt;a href="https://docs.ollama.com/faq" rel="noopener noreferrer"&gt;Ollama's FAQ&lt;/a&gt;. Two things change them: the &lt;code&gt;OLLAMA_MODELS&lt;/code&gt; environment variable, and the Model location setting in the desktop app on a Mac or Windows PC. If you, an installer or a guide you followed ever set either, the models are wherever that points.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find the store your install really uses
&lt;/h2&gt;

&lt;p&gt;On a Mac, the desktop app shows the current folder under Settings, Model location. From Terminal, check whether the variable is set for apps, then measure the default folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;launchctl getenv OLLAMA_MODELS
du -sh ~/.ollama/models
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Linux with the systemd service, the variable lives in the service, not in your shell, and the default folder belongs to the &lt;code&gt;ollama&lt;/code&gt; user. These print the variable if it is set, and that user's home folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl show ollama --property=Environment
getent passwd ollama &lt;span class="o"&gt;|&lt;/span&gt; cut -d: -f6
sudo du -sh /usr/share/ollama/.ollama/models
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A distribution's own package can give that user a different home than the install script does, so trust the second command over the table above.&lt;/p&gt;

&lt;p&gt;On Windows, look in the app's Settings, or ask PowerShell for the variable and the size of the default folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nc"&gt;GetEnvironmentVariable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"OLLAMA_MODELS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="s2"&gt;"{0:N1} GB"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Get&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;ChildItem&lt;/span&gt; &lt;span class="s2"&gt;"$env:USERPROFILE\.ollama\models"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Recurse&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;File&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nc"&gt;Measure&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Object&lt;/span&gt; &lt;span class="nc"&gt;Length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Sum&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Sum&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1GB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Docker, the models are in whatever volume you mounted at &lt;code&gt;/root/.ollama&lt;/code&gt;. &lt;code&gt;docker volume inspect ollama&lt;/code&gt; shows where Docker keeps that volume, if you used the name from Ollama's instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blobs, manifests, and why the numbers disagree
&lt;/h2&gt;

&lt;p&gt;The store has two folders. &lt;code&gt;models/blobs&lt;/code&gt; holds the weights as files named &lt;code&gt;sha256-&amp;lt;hash&amp;gt;&lt;/code&gt;, and that's where nearly all the size is. &lt;code&gt;models/manifests&lt;/code&gt; holds small files, one per model tag, each listing the blobs that tag is built from.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F686q8cwtycsmie2bkyvq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F686q8cwtycsmie2bkyvq.png" alt="Diagram: two Ollama manifests, llama3.1:8b and a custom model built from it, both point at the same 4.9 GB weights blob; each also points at a few small blobs. ollama list shows 4.9 GB for each, while the blobs directory holds the weights once." width="799" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because blobs are named by their content, two tags that share a layer share the file. A model you create from a Modelfile with &lt;code&gt;FROM llama3.1:8b&lt;/code&gt; reuses the base weights and adds a few kilobytes of its own. &lt;code&gt;ollama list&lt;/code&gt; shows each model's full size, so shared layers are counted once per model, and the list can add up to far more than the folder holds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama list
du -sh ~/.ollama/models/blobs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trust &lt;code&gt;du&lt;/code&gt; for how much disk you're using and &lt;code&gt;ollama list&lt;/code&gt; for how big each model is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deleting models
&lt;/h2&gt;

&lt;p&gt;Always through Ollama, never by deleting blobs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama rm llama3.1:70b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That removes the manifest and then any blob no other manifest still uses, and the space comes back straight away. The same command works in Terminal, in a Linux shell and in PowerShell. To remove every model at once on a Mac or Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama list &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'NR&amp;gt;1 {print $1}'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; xargs -n1 ollama rm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A model that's loaded keeps its memory until it's unloaded, which Ollama does by default five minutes after it was last used. &lt;code&gt;ollama ps&lt;/code&gt; shows what's loaded, and &lt;code&gt;ollama stop llama3.1:70b&lt;/code&gt; unloads it now.&lt;/p&gt;

&lt;p&gt;Deleting a blob by hand leaves a manifest pointing at a file that no longer exists. You find out later, when the model won't load and the error mentions a missing layer. The repair is to remove that model and pull it again. There's no repair tool for the store.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A model you pulled is a re-download. A model you built with a Modelfile, or fine-tuned, has no copy anywhere else, and deleting it is permanent. Look through &lt;code&gt;ollama list&lt;/code&gt; for names that aren't on any registry before a clear-out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Removing Ollama and its models completely
&lt;/h3&gt;

&lt;p&gt;On a Mac, quit Ollama, delete the app, and delete &lt;code&gt;~/.ollama&lt;/code&gt;, which holds the models, your keys and the logs. Ollama's &lt;a href="https://docs.ollama.com/macos" rel="noopener noreferrer"&gt;macOS notes&lt;/a&gt; list the few smaller folders it also leaves in &lt;code&gt;~/Library&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;On Windows, uninstall Ollama from Settings, Apps. Ollama's documentation says the uninstaller doesn't remove models you moved with &lt;code&gt;OLLAMA_MODELS&lt;/code&gt;, so delete that folder yourself if you had one.&lt;/p&gt;

&lt;p&gt;On Linux, Ollama's &lt;a href="https://docs.ollama.com/linux" rel="noopener noreferrer"&gt;Linux page&lt;/a&gt; gives the full uninstall. The part that frees the space is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl stop ollama
sudo systemctl disable ollama
sudo userdel ollama
sudo groupdel ollama
sudo rm -r /usr/share/ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Moving the store to another drive
&lt;/h2&gt;

&lt;p&gt;Quit Ollama first, on every platform. Then point it at the new folder and move the existing models across, or you'll start with an empty store.&lt;/p&gt;

&lt;p&gt;On a Mac or Windows PC with the desktop app, the simplest way is Settings, Model location: choose the folder on the other drive. Then run &lt;code&gt;ollama list&lt;/code&gt;. If your models are missing, quit Ollama again, move the contents of the old &lt;code&gt;models&lt;/code&gt; folder into the new one and start Ollama.&lt;/p&gt;

&lt;p&gt;Without the app, set &lt;code&gt;OLLAMA_MODELS&lt;/code&gt;. On a Mac, set it through launchd so the app sees it, not only your shell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;launchctl setenv OLLAMA_MODELS /Volumes/External/ollama
mv ~/.ollama/models /Volumes/External/ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A value set with &lt;code&gt;launchctl setenv&lt;/code&gt; doesn't survive a restart of the Mac, so it has to be set again after a reboot, before Ollama starts.&lt;/p&gt;

&lt;p&gt;On Windows, open Settings, search for "environment variables", choose Edit environment variables for your account, and add &lt;code&gt;OLLAMA_MODELS&lt;/code&gt; with the new folder as its value. Move the old &lt;code&gt;models&lt;/code&gt; folder there, then start Ollama from the Start menu.&lt;/p&gt;

&lt;p&gt;On Linux with the systemd service, the variable goes in the service, and the &lt;code&gt;ollama&lt;/code&gt; user has to own the new folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo mkdir -p /mnt/models
sudo chown -R ollama:ollama /mnt/models
sudo systemctl edit ollama
&lt;span class="c"&gt;# [Service]&lt;/span&gt;
&lt;span class="c"&gt;# Environment="OLLAMA_MODELS=/mnt/models"&lt;/span&gt;
sudo systemctl restart ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An external SSD is fine for running models. The weights are read once when the model loads, so a slower drive costs you a few seconds at load time, not speed while you chat. A spinning disk or a network share is different: loading a 43 GB model over a network takes minutes. Sharing one store between two machines works with a read-only mount and a single writer, but two machines pulling into it at once can corrupt manifests. &lt;a href="https://bytesweep.app/blog/move-ai-models-external-drive.html" rel="noopener noreferrer"&gt;Moving model stores to an external drive&lt;/a&gt; covers the other tools' stores too.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you were looking for LM Studio
&lt;/h2&gt;

&lt;p&gt;LM Studio keeps its models in a different folder and a different format, so the two never share files:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;LM Studio models&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;macOS&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;~/.lmstudio/models&lt;/code&gt;, older versions &lt;code&gt;~/.cache/lm-studio/models&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windows&lt;/td&gt;
&lt;td&gt;&lt;code&gt;C:\Users\&amp;lt;you&amp;gt;\.lmstudio\models&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Linux&lt;/td&gt;
&lt;td&gt;&lt;code&gt;~/.lmstudio/models&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The app shows the current folder under My Models, and you can change it there. &lt;a href="https://bytesweep.app/blog/lm-studio-storage.html" rel="noopener noreferrer"&gt;LM Studio's model folder&lt;/a&gt; explains the layout, and &lt;a href="https://bytesweep.app/ai-model-storage.html" rel="noopener noreferrer"&gt;where AI models are stored&lt;/a&gt; puts Ollama, LM Studio and Hugging Face side by side on all three systems.&lt;/p&gt;

&lt;p&gt;On a machine doing local AI work, the same model is often on disk more than once, in each tool's format. This shows all the usual stores on a Mac or Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;du -sh ~/.ollama ~/.cache/huggingface ~/.lmstudio ~/.cache/lm-studio 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://bytesweep.app/blog/huggingface-cache-cleanup.html" rel="noopener noreferrer"&gt;The Hugging Face cache&lt;/a&gt; keeps every revision you've ever downloaded unless you prune it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Why is my blobs folder bigger than the models I have?
&lt;/h3&gt;

&lt;p&gt;Usually a partial download from an interrupted pull, or blobs orphaned by deleting manifests by hand. Compare the blobs folder with what the manifests list before you assume it's normal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Ollama and LM Studio use the same model files?
&lt;/h3&gt;

&lt;p&gt;Not directly. Ollama stores weights as hashed blobs with its own manifests, and LM Studio reads model files from a publisher and model folder tree. You can import a GGUF file into Ollama with a Modelfile, but that copies it into Ollama's store.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is a quantised model worth the space it saves?
&lt;/h3&gt;

&lt;p&gt;Usually, and the trade-off isn't linear. A four-bit quantisation of a larger model is commonly better than an eight-bit one of a smaller model at the same size on disk.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://bytesweep.app/blog/ollama-models-disk.html" rel="noopener noreferrer"&gt;bytesweep.app&lt;/a&gt;. Written with AI assistance and checked against Ollama's documentation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ollama</category>
      <category>ai</category>
      <category>linux</category>
      <category>macos</category>
    </item>
  </channel>
</rss>
