{"id":652,"date":"2025-02-03T20:20:54","date_gmt":"2025-02-04T04:20:54","guid":{"rendered":"https:\/\/downthecrop.xyz\/blog\/?p=652"},"modified":"2025-02-03T20:20:54","modified_gmt":"2025-02-04T04:20:54","slug":"how-to-change-ollamas-model-directory-with-a-symlink","status":"publish","type":"post","link":"https:\/\/downthecrop.xyz\/blog\/how-to-change-ollamas-model-directory-with-a-symlink\/","title":{"rendered":"How to Change Ollama&#8217;s Model Directory with a Symlink"},"content":{"rendered":"<p>Ollama stores AI models in <code>~\/.ollama<\/code> by default, but if you want to use an external drive or a different location, you can change this with a symbolic link. This guide shows you how.<\/p>\n<h2>Step 1: Install Ollama<\/h2>\n<p>First, install Ollama by following the official instructions:<\/p>\n<ul>\n<li><strong>Mac App:<\/strong> Just download the app and drag it into Applications: <a href=\"https:\/\/ollama.com\/download\">https:\/\/ollama.com\/download<\/a><\/li>\n<\/ul>\n<p>Alternatively you can install via homebrew: <code>brew install ollama<\/code><\/p>\n<h2>Step 2: Remove the Existing <code>.ollama<\/code> Directory<\/h2>\n<p>Ollama stores its models in <code>~\/.ollama<\/code>. If you've already downloaded models, back them up before creating the symlink.<\/p>\n<pre><code class=\"language-sh\">mv ~\/.ollama ~\/.ollama_backup<\/code><\/pre>\n<h2>Step 3: Create a Symlink to Your New Location<\/h2>\n<p>Choose the location where you want Ollama to store models. If you have an external SSD or another directory, point the symlink there.<\/p>\n<pre><code class=\"language-sh\">ln -s \/Volumes\/SSD\/Ollama ~\/.ollama<\/code><\/pre>\n<h2>Step 4: Verify the Symlink<\/h2>\n<p>Check that <code>~\/.ollama<\/code> now points to your chosen directory:<\/p>\n<pre><code class=\"language-sh\">ls -l ~\/.ollama<\/code><\/pre>\n<p>If the output shows <code>~\/.ollama -&gt; \/Volumes\/SSD\/Ollama<\/code>, it's working.<\/p>\n<h2>Step 5: Test Ollama<\/h2>\n<p>Run a model to confirm it's downloading to the new location:<\/p>\n<pre><code class=\"language-sh\">ollama run deepseek-r1:32b<\/code><\/pre>\n<p>Then check the model directory:<\/p>\n<pre><code class=\"language-sh\">ls -l \/Volumes\/SSD\/Ollama\/models<\/code><\/pre>\n<p>If you see the downloaded model there, the setup is complete! Now, Ollama will store all models in your preferred location.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ollama stores AI models in ~\/.ollama by default, but if you want to use an external drive or a different location, you can change this with a symbolic link. This guide shows you how. Step 1: Install Ollama First, install Ollama by following the official instructions: Mac App: Just download the app and drag it &hellip; <a href=\"https:\/\/downthecrop.xyz\/blog\/how-to-change-ollamas-model-directory-with-a-symlink\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to Change Ollama&#8217;s Model Directory with a Symlink<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[774,773],"tags":[778,777,776,239,775,779],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/posts\/652"}],"collection":[{"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/comments?post=652"}],"version-history":[{"count":1,"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/posts\/652\/revisions"}],"predecessor-version":[{"id":653,"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/posts\/652\/revisions\/653"}],"wp:attachment":[{"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/media?parent=652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/categories?post=652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/downthecrop.xyz\/blog\/wp-json\/wp\/v2\/tags?post=652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}