<?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: DiskInsight</title>
    <description>The latest articles on DEV Community by DiskInsight (@diskinsight).</description>
    <link>https://dev.to/diskinsight</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%2F4195718%2F684a21d2-8b4c-4989-beb4-23a26d5d20d1.png</url>
      <title>DEV Community: DiskInsight</title>
      <link>https://dev.to/diskinsight</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/diskinsight"/>
    <language>en</language>
    <item>
      <title>Docker.raw: Why Is My Mac Out of Space When Docker Is Empty?</title>
      <dc:creator>DiskInsight</dc:creator>
      <pubDate>Wed, 21 Oct 2026 11:40:02 +0000</pubDate>
      <link>https://dev.to/diskinsight/dockerraw-why-is-my-mac-out-of-space-when-docker-is-empty-3eb9</link>
      <guid>https://dev.to/diskinsight/dockerraw-why-is-my-mac-out-of-space-when-docker-is-empty-3eb9</guid>
      <description>&lt;p&gt;You pull one image, run it for an afternoon, and four months later your Mac is out of space even though &lt;code&gt;docker ps&lt;/code&gt; shows nothing running. The culprit is &lt;code&gt;Docker.raw&lt;/code&gt; — the file Docker Desktop uses as its virtual hard disk.&lt;/p&gt;

&lt;p&gt;It only ever grows, and nothing you do with &lt;code&gt;docker rmi&lt;/code&gt; shrinks the file. Here's the actual mechanism and the safe ways to reclaim the gigabytes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Docker.raw is
&lt;/h2&gt;

&lt;p&gt;Docker Desktop on Apple Silicon runs Linux VMs inside a single dynamic disk file. Every image, container, volume, and build layer you've ever had is stored in that one file:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw&lt;/code&gt; (Apple Silicon)&lt;/li&gt;
&lt;li&gt;Inside Docker Desktop's &lt;code&gt;Data/vms/0/data/&lt;/code&gt; directory (x86, usually &lt;code&gt;.raw&lt;/code&gt; too)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Docker.raw is a &lt;em&gt;sparse/dynamic&lt;/em&gt; disk: it grows when you use space, but &lt;strong&gt;by design it doesn't reclaim space when you delete a container&lt;/strong&gt;. The freed blocks stay reserved inside the file. So even after &lt;code&gt;docker system prune -af&lt;/code&gt;, your disk is still full — Docker thinks you're fine because &lt;em&gt;inside its VM&lt;/em&gt; the space is free.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confirm it's your problem
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;docker system df&lt;/code&gt; shows the VM image's size, but &lt;code&gt;du&lt;/code&gt; on the &lt;code&gt;.raw&lt;/code&gt; file shows the &lt;em&gt;actual&lt;/em&gt; on-disk footprint. If Docker.raw is 40 GB while &lt;code&gt;docker image ls&lt;/code&gt; is 3 GB — that's the black hole.&lt;/p&gt;

&lt;h2&gt;
  
  
  The safe shrink (no data loss, Docker-way)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Prune what's actually cruft
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker system prune &lt;span class="nt"&gt;-af&lt;/span&gt;
docker builder prune &lt;span class="nt"&gt;-af&lt;/span&gt;
docker volume prune &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This frees space &lt;em&gt;inside&lt;/em&gt; the VM. The &lt;code&gt;.raw&lt;/code&gt; file still won't shrink yet.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Reclaim the file (the part people miss)
&lt;/h3&gt;

&lt;p&gt;In Docker Desktop settings there's the manual lever: &lt;strong&gt;Docker Desktop → Settings → Resources → Advanced → Disk image size&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option A — resize/recreate the VM (effective):&lt;/strong&gt; change the Disk image size to a smaller value → Apply &amp;amp; Restart. Docker recreates &lt;code&gt;Docker.raw&lt;/code&gt; at the new size (often shrinking the file). Or remove the file while Docker is fully quit and let Docker recreate it empty — but that &lt;strong&gt;destroys your images, containers, and volumes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option B — the direct one-liner for the brave:&lt;/strong&gt; quit Docker fully, then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# only if Docker Desktop is QUIT, and you accept images/volumes are recreated&lt;/span&gt;
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again: this deletes the VM contents. Re-pulling images rebuilds the file.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Do not fall for "docker system prune" alone
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;docker system prune -af&lt;/code&gt; frees space inside the VM. It &lt;em&gt;doesn't&lt;/em&gt; shrink &lt;code&gt;Docker.raw&lt;/code&gt;. The file only shrinks via the disk-image-size control, or by recreating the VM. Layering these two is what actually returns gigabytes to your Mac.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prevent it next time
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set a hard disk-image cap&lt;/strong&gt; in Docker Desktop settings that's smaller than "maximum".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prune regularly&lt;/strong&gt;: &lt;code&gt;docker system prune -af &amp;amp;&amp;amp; docker builder prune -af&lt;/code&gt; weekly-ish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove big unused images&lt;/strong&gt;: &lt;code&gt;docker images&lt;/code&gt; → untagged ones (&lt;code&gt;&amp;lt;none&amp;gt;&lt;/code&gt;) hold the most.&lt;/li&gt;
&lt;li&gt;Remember Homebrew isn't the only thing that grows — DerivedData and node_modules grow too.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  See it on the map first
&lt;/h2&gt;

&lt;p&gt;The most satisfying way to fix a silent 40 GB before it becomes an "out of space" crisis: see your disk as folders, sorted by bytes. DiskInsight renders that — every folder, every cache, hidden or not — so &lt;code&gt;Docker.raw&lt;/code&gt; shows up as a giant block you can click and inspect before touching anything. Everything is staged to the Trash for your review; nothing is deleted behind your back. 100% local, no telemetry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Docker.raw&lt;/code&gt; is a dynamic disk that grows and never shrinks by itself. &lt;code&gt;docker system prune&lt;/code&gt; frees space &lt;em&gt;inside&lt;/em&gt; it. To actually get gigabytes back on your Mac:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;docker system prune -af &amp;amp;&amp;amp; docker builder prune -af&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Reduce &lt;strong&gt;Disk image size&lt;/strong&gt; in Docker Desktop settings (or recreate the VM if you accept images are gone).&lt;/li&gt;
&lt;li&gt;Keep the cap low so it stops re-bloating.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;DiskInsight&lt;/strong&gt; is a local macOS disk analyzer with nine visualizers; scanning is free forever, and a one-time Pro unlock adds duplicate cleanup, a dev cache cleaner (Xcode, npm, CocoaPods, Gradle) and a full app uninstaller. Nothing is uploaded, no account, no telemetry.&lt;/p&gt;

&lt;p&gt;More: &lt;a href="https://diskinsight.com" rel="noopener noreferrer"&gt;https://diskinsight.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
    </item>
    <item>
      <title>The node_modules Black Hole: Recursively Finding and Cleaning Projects</title>
      <dc:creator>DiskInsight</dc:creator>
      <pubDate>Tue, 20 Oct 2026 08:37:09 +0000</pubDate>
      <link>https://dev.to/diskinsight/the-nodemodules-black-hole-recursively-finding-and-cleaning-projects-1887</link>
      <guid>https://dev.to/diskinsight/the-nodemodules-black-hole-recursively-finding-and-cleaning-projects-1887</guid>
      <description>&lt;p&gt;Somewhere on your Mac there are dozens of &lt;code&gt;node_modules&lt;/code&gt; folders, and you haven't thought about most of them in months. Each one is 200 MB–2 GB of installed packages — including the ones for projects you deleted, archived, or rage-quit two laptops ago.&lt;/p&gt;

&lt;p&gt;This is the single biggest "quiet" disk eater for anyone who's ever run &lt;code&gt;npm install&lt;/code&gt;. Let's find them all, safely delete the dead ones, and stop them from re-growing.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, measure: how bad is it?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"node_modules"&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; d &lt;span class="nt"&gt;-prune&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-50&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That lists the &lt;em&gt;folders&lt;/em&gt;. For the actual byte counts (the number that matters), do this from a big directory like &lt;code&gt;~/Developer&lt;/code&gt;, &lt;code&gt;~/Projects&lt;/code&gt;, or your 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;find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"node_modules"&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; d &lt;span class="nt"&gt;-prune&lt;/span&gt; &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; + 2&amp;gt;/dev/null | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-rh&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see the map: a handful of heavy projects, a graveyard of old ones. A typical developer who's shipped a few projects has 10–50 GB tied up here.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's safe to delete?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Everything under &lt;code&gt;node_modules&lt;/code&gt; is disposable.&lt;/strong&gt; That's the whole point — it's re-downloadable packages, not your code. Your actual work lives in the project's &lt;code&gt;src/&lt;/code&gt;, &lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;package-lock.json&lt;/code&gt; / &lt;code&gt;yarn.lock&lt;/code&gt; / &lt;code&gt;pnpm-lock.yaml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Rules of thumb:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Delete the whole folder&lt;/strong&gt; when a project is archived on GitHub/GitLab — &lt;code&gt;rm -rf project/node_modules&lt;/code&gt; reclaims everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only reinstall if you need it&lt;/strong&gt; — you'll swap it in from git before you work on it again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never delete a project folder&lt;/strong&gt; believing its &lt;code&gt;node_modules&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; your work — your code is separate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For an individual project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/Projects/old-thing
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; node_modules
npm ci
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That drops it to the locked package set — and if the lockfile is gone, &lt;code&gt;npm install&lt;/code&gt; quietly does the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  The recursive one-liner (delete nothing blindly)
&lt;/h2&gt;

&lt;p&gt;If you want to strip &lt;code&gt;node_modules&lt;/code&gt; from a whole tree of projects &lt;em&gt;in-place&lt;/em&gt; (not delete the projects), this is the surgical version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"node_modules"&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; d &lt;span class="nt"&gt;-prune&lt;/span&gt; &lt;span class="nt"&gt;-ok&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt; 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;-ok&lt;/code&gt; asks before every deletion — boring but safe. Drop &lt;code&gt;-ok&lt;/code&gt; and swap to &lt;code&gt;-exec rm -rf {} +&lt;/code&gt; only when you've visually inspected the &lt;code&gt;du -sh&lt;/code&gt; list above and know exactly what you're targeting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Also on the Node disk-bloat list
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;node_modules&lt;/code&gt; isn't alone. The other Node space-suckers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;~/.npm/_cacache&lt;/code&gt; — npm's global cache. &lt;strong&gt;Safe to clear.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~/.yarn/cache&lt;/code&gt; and &lt;code&gt;~/.cache/yarn&lt;/code&gt; — Yarn 2+ hard-link cache.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~/.pnpm-store&lt;/code&gt; — pnpm's content-addressable store.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~/.cache/node&lt;/code&gt; / the node-gyp cache.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm cache clean &lt;span class="nt"&gt;--force&lt;/span&gt;
yarn cache clean
pnpm store prune
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;brew cleanup&lt;/code&gt; also handles some old node-install cruft, but the npm/Yarn/pnpm moves above are the real ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it comes back (and how to stop it)
&lt;/h2&gt;

&lt;p&gt;Because every fresh &lt;code&gt;npm install&lt;/code&gt; rebuilds the folder. Tricks for keeping disk usage sane:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Aggressive &lt;code&gt;.gitignore&lt;/code&gt; discipline&lt;/strong&gt; — if &lt;code&gt;node_modules&lt;/code&gt; gets committed, every clone on this machine rips a fresh copy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pnpm instead of npm&lt;/strong&gt; — pnpm dedupes via a global store + hard links, so 30 projects create disk weight for one, not 30.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Archive, don't hoard&lt;/strong&gt; — old projects you're not touching belong in git, not wearing 2 GB of installed packages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  See it, then clean what matters
&lt;/h2&gt;

&lt;p&gt;A disk analyzer makes this trivial — sort by size, and the dead Node projects jump to the top in seconds. The point isn't to delete by magic; it's to see the map and decide.&lt;/p&gt;

&lt;p&gt;DiskInsight scans your disk, ranks every folder by byte cost (including hidden &lt;code&gt;node_modules&lt;/code&gt;, DerivedData, sim caches), and stages anything you choose to the Trash — no irreversible deletion, no &lt;code&gt;rm -rf&lt;/code&gt; of the wrong tree. 100% local, no telemetry.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 30-second fix
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Run the &lt;code&gt;find&lt;/code&gt; + &lt;code&gt;du -sh&lt;/code&gt; one-liner to see the damage.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;npm cache clean --force&lt;/code&gt; (safe, immediate win).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rm -rf&lt;/code&gt; the &lt;code&gt;node_modules&lt;/code&gt; of archived projects only.&lt;/li&gt;
&lt;li&gt;If you host old repos, delete their local clones — git keeps your reality.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Node disk bloat is the most fixable developer disk problem on macOS, bar none.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;DiskInsight&lt;/strong&gt; is a local macOS disk analyzer with nine visualizers; scanning is free forever, and a one-time Pro unlock adds duplicate cleanup, a dev cache cleaner (Xcode, npm, CocoaPods, Gradle) and a full app uninstaller. Nothing is uploaded, no account, no telemetry.&lt;/p&gt;

&lt;p&gt;More: &lt;a href="https://diskinsight.com" rel="noopener noreferrer"&gt;https://diskinsight.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>javascript</category>
      <category>node</category>
      <category>tools</category>
    </item>
    <item>
      <title>How to Find the Largest Files on Your Mac (Fast, Free Methods)</title>
      <dc:creator>DiskInsight</dc:creator>
      <pubDate>Tue, 20 Oct 2026 08:36:20 +0000</pubDate>
      <link>https://dev.to/diskinsight/how-to-find-the-largest-files-on-your-mac-fast-free-methods-2kff</link>
      <guid>https://dev.to/diskinsight/how-to-find-the-largest-files-on-your-mac-fast-free-methods-2kff</guid>
      <description>&lt;p&gt;"Where did my free space go?" almost always resolves to a handful of giant files: an old disk image, a 4K video, a &lt;code&gt;Photos&lt;/code&gt; library, a &lt;code&gt;.pkg&lt;/code&gt; you downloaded twice. Finding the top 20 gives you 80% of the win.&lt;/p&gt;

&lt;p&gt;Here are the fastest methods on macOS - one app-legit, one terminal, one visual - with exactly how much they cost in effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 1 - Finder (no install)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Finder&lt;/strong&gt;, hit &lt;code&gt;⌘F&lt;/code&gt; (Find), set search location to &lt;strong&gt;This Mac&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add filters: &lt;strong&gt;File size&lt;/strong&gt; → &lt;strong&gt;"is greater than"&lt;/strong&gt; → type &lt;code&gt;1 GB&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Sorted by size, top results first. Whatever the giant is, it's here.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Repeat with &lt;strong&gt;This Mac = "is greater than" 0.5 GB&lt;/strong&gt; if 1 GB cut out the interesting stuff.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method 2 - Terminal (precise, instant)
&lt;/h2&gt;

&lt;p&gt;The workhorse. From a folder or your home, list the heaviest files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# top 30 biggest files under the current dir&lt;/span&gt;
find &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;-type&lt;/span&gt; f &lt;span class="nt"&gt;-size&lt;/span&gt; +1G &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; &lt;span class="o"&gt;{}&lt;/span&gt; + 2&amp;gt;/dev/null | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-rh&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-30&lt;/span&gt;

&lt;span class="c"&gt;# same, but any size, sorted top-down&lt;/span&gt;
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-rn&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-30&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $1, $2}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And to find the &lt;em&gt;folders&lt;/em&gt; that hide the files (the only "big folder, small files" paradox):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; ~/Library/Developer 2&amp;gt;/dev/null
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; ~/Pictures 2&amp;gt;/dev/null
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; ~/Downloads 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Method 3 - A disk map (see the structure, not just a list)
&lt;/h2&gt;

&lt;p&gt;Files hide inside folders. The terminal list shows you &lt;code&gt;videos/week4-4k.mov&lt;/code&gt; - a treemap shows you &lt;em&gt;why&lt;/em&gt; &lt;code&gt;~/Pictures&lt;/code&gt; is 40 GB at a glance (one giant library vs 20,000 photos).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every folder rendered as a rectangle sized by bytes&lt;/li&gt;
&lt;li&gt;Zoom from drive → folder → a single file&lt;/li&gt;
&lt;li&gt;Hidden &amp;amp; contained folders (&lt;code&gt;~/Library/Application Support&lt;/code&gt;, &lt;code&gt;~/Library/Containers&lt;/code&gt;) counted for real&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's what I built DiskInsight to do: nine views, one scan, byte-exact - see it, decide, stage to Trash, never auto-delete. &lt;strong&gt;100% local, no telemetry, one-time price.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll typically find (and what's safe)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;.dmg/IPSW installers&lt;/strong&gt; in &lt;code&gt;~/Downloads&lt;/code&gt; - safe to delete once installed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~/Pictures/Photos Library&lt;/strong&gt; - review before deleting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Movies&lt;/strong&gt;: the 4K editing originals - archive to an external drive&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~/Library/Developer&lt;/strong&gt; - Xcode DerivedData &amp;amp; simulators&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~/Library/Caches&lt;/strong&gt; - everything worth clearing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker.raw&lt;/strong&gt; - the never-shrinking blob&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The honest rule: &lt;strong&gt;caches and installers are always re-downloadable; your Documents/Desktop/Pictures are not.&lt;/strong&gt; Delete accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 30-second version
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Finder &lt;code&gt;⌘F&lt;/code&gt; → This Mac → size &amp;gt; 1 GB. There's your top-10.&lt;/li&gt;
&lt;li&gt;If a &lt;em&gt;folder&lt;/em&gt; hides the space, &lt;code&gt;du -sh&lt;/code&gt; the top-family folders.&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;~/Library/Developer&lt;/code&gt; and &lt;code&gt;~/Library/Caches&lt;/code&gt; if you build apps.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And when a list isn't enough, visualize: see the disk the way math sees it - rectangles scaled by bytes, ranked, inspectable, reversible.&lt;/p&gt;




&lt;p&gt;I'm building &lt;strong&gt;DiskInsight&lt;/strong&gt; - a local macOS disk analyzer with nine visualizers (treemap, sunburst, flame graph, bubbles, mind map, age map, top sizes, list, folders). Scanning is free forever; a one-time Pro unlock adds duplicate cleanup, a dev cache cleaner (Xcode, npm, CocoaPods, Gradle) and a full app uninstaller. Nothing is uploaded, no account, no telemetry.&lt;/p&gt;

&lt;p&gt;More: &lt;a href="https://diskinsight.com" rel="noopener noreferrer"&gt;https://diskinsight.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>productivity</category>
      <category>tools</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
