<?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: auliamnaufal</title>
    <description>The latest articles on DEV Community by auliamnaufal (@auliamnaufal).</description>
    <link>https://dev.to/auliamnaufal</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%2F557627%2F9d1ffbd6-3a15-45b8-8de0-3884c7f6b942.png</url>
      <title>DEV Community: auliamnaufal</title>
      <link>https://dev.to/auliamnaufal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/auliamnaufal"/>
    <language>en</language>
    <item>
      <title>Your AI Coding Agents Are Filling Up Your Disk. Here’s How to Clean Up Safely</title>
      <dc:creator>auliamnaufal</dc:creator>
      <pubDate>Mon, 12 Oct 2026 17:25:51 +0000</pubDate>
      <link>https://dev.to/auliamnaufal/your-ai-coding-agents-are-filling-up-your-disk-heres-how-to-clean-up-safely-2a43</link>
      <guid>https://dev.to/auliamnaufal/your-ai-coding-agents-are-filling-up-your-disk-heres-how-to-clean-up-safely-2a43</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;code&gt;agent-janitor&lt;/code&gt; scans agent data across tools, shows what it finds, and archives eligible files before removing them.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you use AI coding agents regularly, they leave more behind than code.&lt;/p&gt;

&lt;p&gt;Session transcripts, debug logs, caches, and old worktrees can quietly accumulate across your machine. After months of use, it can be hard to tell what’s taking up space—and harder to know what’s safe to remove.&lt;/p&gt;

&lt;p&gt;A generic disk cleaner doesn’t understand the difference between a disposable cache and a session you may want to resume. A tool built for one coding agent won’t necessarily help with the others.&lt;/p&gt;

&lt;p&gt;That’s why I built &lt;strong&gt;&lt;a href="https://github.com/auliamnaufal/agent-janitor" rel="noopener noreferrer"&gt;agent-janitor&lt;/a&gt;&lt;/strong&gt;: a CLI for inspecting, classifying, and safely reclaiming data left behind by AI coding agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a read-only scan
&lt;/h2&gt;

&lt;p&gt;You can run a scan without installing the package globally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agent-janitor scan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The scan reports what it finds, how large it is, when it was last touched, and how it is classified. For example, it can distinguish between regenerable cache data and transcripts that may contain session state.&lt;/p&gt;

&lt;p&gt;It can also scan transcript content for known credential patterns. That’s an exposure warning—not automatic secret removal or redaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clean up with a way back
&lt;/h2&gt;

&lt;p&gt;When you choose to clean up, &lt;code&gt;agent-janitor&lt;/code&gt; is designed to archive eligible items before removing them. By default, it applies a 30-day retention gate, so recent or active data is skipped.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agent-janitor clean
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can restore archived data later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;agent-janitor restore &lt;span class="nt"&gt;--list&lt;/span&gt;
agent-janitor restore latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or find archived sessions using a session ID or project name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;agent-janitor restore &amp;lt;session-id&amp;gt;
agent-janitor restore &amp;lt;project-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal is to make cleanup less of a gamble: review what the tool found, archive what it acts on, and restore items when you need them again.&lt;/p&gt;

&lt;h2&gt;
  
  
  One tool for several agent data stores
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;agent-janitor&lt;/code&gt; currently includes drivers for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, and agent-created Git worktrees. It brings those into one scan and cleanup workflow rather than requiring a different cleanup process for each tool.&lt;/p&gt;

&lt;p&gt;It also has optional ways to make checks part of your routine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A weekly scheduled summary&lt;/li&gt;
&lt;li&gt;A shell prompt segment&lt;/li&gt;
&lt;li&gt;A pre-push check for orphaned worktree registrations, staged agent artifacts, and likely secrets in changed files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are opt-in; you can start with a one-time scan and decide whether to install them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The package requires Node.js 20 or newer. To inspect your machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agent-janitor scan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the full command list and safety details, visit the &lt;a href="https://github.com/auliamnaufal/agent-janitor" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; or the &lt;a href="https://www.npmjs.com/package/agent-janitor" rel="noopener noreferrer"&gt;npm package page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you use multiple AI coding agents, I’d like to hear what kinds of files and workflows you’d want &lt;code&gt;agent-janitor&lt;/code&gt; to support next. Share feedback or report an issue on &lt;a href="https://github.com/auliamnaufal/agent-janitor/issues" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>claude</category>
      <category>chatgpt</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
