<?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: ran Guo</title>
    <description>The latest articles on DEV Community by ran Guo (@dreamofxm).</description>
    <link>https://dev.to/dreamofxm</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%2F4194101%2Ff753d1ce-6668-406e-9ba4-4482dc48734a.png</url>
      <title>DEV Community: ran Guo</title>
      <link>https://dev.to/dreamofxm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dreamofxm"/>
    <language>en</language>
    <item>
      <title>A macOS disk cleaner that shows the cost before it deletes</title>
      <dc:creator>ran Guo</dc:creator>
      <pubDate>Mon, 19 Oct 2026 12:41:16 +0000</pubDate>
      <link>https://dev.to/dreamofxm/a-macos-disk-cleaner-that-shows-the-cost-before-it-deletes-37i3</link>
      <guid>https://dev.to/dreamofxm/a-macos-disk-cleaner-that-shows-the-cost-before-it-deletes-37i3</guid>
      <description>&lt;p&gt;Most cleanup tools ask for the same thing: trust. You press Clean, a progress bar moves, a number goes up. What the number never tells you is whether the 12 GB it just removed was a cache the app rebuilds in ten minutes, or a project you spent the week on.&lt;/p&gt;

&lt;p&gt;DiskWise is an open-source macOS cleaner built around one rule: before anything moves, show the cost of every item.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two labels instead of a score
&lt;/h2&gt;

&lt;p&gt;The scanner produces a list of reclaimable directories. Every entry gets one of two labels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Harmless&lt;/code&gt; — caches, logs, temp files. They come back when needed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Downloads again&lt;/code&gt; — recoverable, but only by downloading or rebuilding.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No score out of 100. A score invites arguments; a label forces a decision. Anything the scanner cannot describe with confidence stays out of the cleanup list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three steps, one delete path
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Plan.&lt;/strong&gt; The scan groups directories by cause: app caches, Xcode build artifacts, simulator data, node_modules, Homebrew downloads, Docker layers, AI coding tool sessions. You pick.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm.&lt;/strong&gt; The app restates the selection with paths and sizes. It feels redundant until you are staring at twelve similarly named folders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Receipt.&lt;/strong&gt; When it finishes, you get a summary of what moved, what is in the Trash, and how to undo.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The delete path is deliberately boring: &lt;code&gt;FileManager.default.trashItem&lt;/code&gt;, plus two guards — a protected-path check and an allowed-root check. No &lt;code&gt;rm&lt;/code&gt;, no privileged helper. Undo restores from the Trash, so there is no private journal that can disagree with the filesystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The scan is conservative, because the allowlist is the whole product
&lt;/h2&gt;

&lt;p&gt;Every entry carries a written explanation: what this folder is, and what happens after it is removed. Developer locations are treated differently from caches. Xcode DerivedData, simulator devices, package manager caches, and node_modules are presented read-only: the app points at them, you decide what to do.&lt;/p&gt;

&lt;p&gt;That is also why there is no "clean everything" button. Aggressive cleanup is easy to demo and hard to forgive.&lt;/p&gt;

&lt;h2&gt;
  
  
  The same guardrails for agents
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;diskwise mcp&lt;/code&gt; starts a local stdio MCP server with six tools: &lt;code&gt;scan_disk&lt;/code&gt;, &lt;code&gt;explain_path&lt;/code&gt;, &lt;code&gt;plan_cleanup&lt;/code&gt;, &lt;code&gt;execute_cleanup&lt;/code&gt;, &lt;code&gt;undo_cleanup&lt;/code&gt;, &lt;code&gt;cleanup_history&lt;/code&gt;. The protocol surface is intentionally narrow. An agent gets a plan it must execute explicitly, deletion still goes to the Trash, and the last operation can be undone. No network access, no telemetry.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is not
&lt;/h2&gt;

&lt;p&gt;It is not a speed-up tool, an antivirus, or an app uninstaller. It shows where the space went, explains what each removal costs, and keeps the whole thing reversible. That is the entire product.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/DreamOfXM/diskwise" rel="noopener noreferrer"&gt;https://github.com/DreamOfXM/diskwise&lt;/a&gt; — free and open source, available from GitHub Releases and the Mac App Store.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>showdev</category>
      <category>swift</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
