title: How to free disk space taken up by (ana)conda?
body: <p>I am using the conda package manager - a lot. By now I have quite a few environments and a lot of downloaded packages taking a lot of space on my SSD. An obvious path to free some of that space is to use the command</p>
  
  <pre><code>conda env export &gt; environment.yml
  </code></pre>
  
  <p>from <a href="https://conda.io/docs/user-guide/tasks/manage-environments.html#exporting-the-environment-file" rel="noreferrer">https://conda.io/docs/user-guide/tasks/manage-environments.html#exporting-the-environment-file</a> to export which packages my old, inactive projects use(d) and then delete these environments. As far as I understand, this should free some of the space in <code>anaconda2/envs/</code>, but not in <code>anaconda2/pkgs/</code>. How do I get rid of these packages? Also, I suspect that there might be quite a few packages still sitting around, to which no environment is linking to - could that happen?</p>
  
  <p>Questions:</p>
  
  <ol>
  <li>In general: What is the best way to reduce the space taken up by conda?</li>
  <li>How do I get rid of packages that no environment is using anymore? How do I prune my packages? I am searching for something like <code>sudo apt-get autoremove</code> from Ubuntu/Debian.</li>
  </ol>