<?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: Bhavik Rohit</title>
    <description>The latest articles on DEV Community by Bhavik Rohit (@bhavik_rohit_0dde2cae346c).</description>
    <link>https://dev.to/bhavik_rohit_0dde2cae346c</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%2Fuser%2Fprofile_image%2F1872667%2Fb2dbebcf-1f89-4a47-ba8e-82fde72dca10.jpg</url>
      <title>DEV Community: Bhavik Rohit</title>
      <link>https://dev.to/bhavik_rohit_0dde2cae346c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bhavik_rohit_0dde2cae346c"/>
    <language>en</language>
    <item>
      <title>why your C drive keeps filling up if you use wsl2 or docker on windows</title>
      <dc:creator>Bhavik Rohit</dc:creator>
      <pubDate>Thu, 17 Sep 2026 16:58:02 +0000</pubDate>
      <link>https://dev.to/bhavik_rohit_0dde2cae346c/why-your-c-drive-keeps-filling-up-if-you-use-wsl2-or-docker-on-windows-509d</link>
      <guid>https://dev.to/bhavik_rohit_0dde2cae346c/why-your-c-drive-keeps-filling-up-if-you-use-wsl2-or-docker-on-windows-509d</guid>
      <description>&lt;p&gt;check this out : &lt;a href="https://space-free.vercel.app/" rel="noopener noreferrer"&gt;https://space-free.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;for months i kept getting the low disk space warning on my C drive and had no idea why. i would delete stuff, clear downloads, uninstall apps, and still barely get anything back. turns out the actual problem was not my files at all.&lt;/p&gt;

&lt;p&gt;if you use wsl2 or docker desktop on windows, both of them store everything inside a virtual disk file called ext4.vhdx or docker_data.vhdx. these files grow automatically as you use docker or wsl, but here is the part nobody tells you, they never shrink back down on their own. so you can delete 50gb worth of containers, old projects inside wsl, run docker system prune, whatever you want, and your windows C drive still shows almost no extra space back. the gigabytes are not gone, they are just stuck inside that virtual disk file.&lt;/p&gt;

&lt;p&gt;there is actually a github issue on microsoft's wsl repo about this exact problem with over a thousand reactions and it has been open since 2019. people are still commenting on it every week. that alone tells you this is not some rare edge case, its a pretty widespread and annoying problem for anyone doing dev work on windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  the manual fix
&lt;/h2&gt;

&lt;p&gt;if you want to fix it yourself right now, here is the actual process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;shut down wsl completely, run wsl --shutdown in powershell&lt;/li&gt;
&lt;li&gt;quit docker desktop fully, not just close the window&lt;/li&gt;
&lt;li&gt;if you are on windows pro or enterprise, enable hyper-v so you get the Optimize-VHD command, then run Optimize-VHD -Path "path to your vhdx file" -Mode Full&lt;/li&gt;
&lt;li&gt;if you are on windows home, you do not have that command, so you use diskpart instead, select the vdisk file, attach it readonly, then run compact vdisk&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;this actually works and can free up tens or even hundreds of gb depending on how long its been building up. but its clunky, you have to remember the paths, remember to shut everything down first, and do it manually every few weeks or your disk just fills right back up.&lt;/p&gt;

&lt;p&gt;on top of the wsl and docker thing, most dev machines also quietly build up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;old node_modules folders in projects you have not opened in months&lt;/li&gt;
&lt;li&gt;build folders and package caches from old projects&lt;/li&gt;
&lt;li&gt;ide caches you forgot existed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;none of this shows up clearly in windows explorer or storage sense, it just looks like one folder using space, not "this is safe to delete" vs "this is not."&lt;/p&gt;

&lt;h2&gt;
  
  
  what i built
&lt;/h2&gt;

&lt;p&gt;i got tired of doing the manual vhdx dance every few weeks so i built spacefree, a windows app that automates that whole shutdown, trim, compact sequence into one click, and also scans for the node_modules and build folder clutter i mentioned above. everything gets a plain label before you touch it, safe to delete, rebuildable, or not cleanable, and deletions go to the recycle bin by default instead of being permanently gone.&lt;/p&gt;

&lt;p&gt;still windows only, still early, 7 day trial with no card needed if anyone wants to try it on their own machine. genuinely curious if other people are hitting the same node_modules and build folder buildup or if that is just me.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://space-free.vercel.app/" rel="noopener noreferrer"&gt;https://space-free.vercel.app/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>windows</category>
      <category>docker</category>
      <category>wsl</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
