<?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: AzaeK</title>
    <description>The latest articles on DEV Community by AzaeK (@azaek).</description>
    <link>https://dev.to/azaek</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%2F4187839%2Fffdb3c17-bee9-4f7b-8141-6f7a7f14d17a.png</url>
      <title>DEV Community: AzaeK</title>
      <link>https://dev.to/azaek</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/azaek"/>
    <language>en</language>
    <item>
      <title>How a 34 GB log filled my Mac's disk, and how I found it</title>
      <dc:creator>AzaeK</dc:creator>
      <pubDate>Fri, 16 Oct 2026 04:47:35 +0000</pubDate>
      <link>https://dev.to/azaek/how-a-34-gb-log-filled-my-macs-disk-and-how-i-found-it-1d4j</link>
      <guid>https://dev.to/azaek/how-a-34-gb-log-filled-my-macs-disk-and-how-i-found-it-1d4j</guid>
      <description>&lt;p&gt;My Mac mini has a 256 GB disk. On 11 October it had 70 GB free, which is fine until you want Xcode and a couple of iOS simulators. I went looking for space and expected to find old Docker images. I found those. I also found one macOS log file that had grown to 34 GB in nine days, and it was still growing.&lt;/p&gt;

&lt;p&gt;If Storage in System Settings shows a big System Data bar and nothing you delete makes it smaller, this may be happening on your Mac too. Here's how I tracked it down, with the commands to check yours. None of them need &lt;code&gt;sudo&lt;/code&gt; until the fix.&lt;/p&gt;

&lt;p&gt;A caveat before you start. This Mac was on a developer beta of macOS 27, and a beta bug is the likeliest cause. On a release build you may never see this, but checking takes a minute.&lt;/p&gt;

&lt;h2&gt;
  
  
  System Data won't tell you
&lt;/h2&gt;

&lt;p&gt;Storage settings put whatever they can't sort into System Data, and they don't let you look inside. Cleanup apps empty caches, which wins back a few gigabytes and changes nothing if something keeps writing. Reinstalling macOS would work. It's also a lost afternoon for one file.&lt;/p&gt;

&lt;p&gt;What works is duller. Measure folders until the numbers add up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making the numbers add up
&lt;/h2&gt;

&lt;p&gt;Start with what the disk says. &lt;code&gt;df&lt;/code&gt; and &lt;code&gt;du&lt;/code&gt; count in binary gigabytes, so their numbers come out smaller than the ones System Settings shows.&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;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /System/Volumes/Data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Filesystem     Size   Used  Avail Capacity  Mounted on
/dev/disk3s5  228Gi  126Gi   70Gi    65%    /System/Volumes/Data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then your home folder, biggest first, and the same again inside whichever folder tops the list:&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; ~/&lt;span class="k"&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
du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; ~/Library/&lt;span class="k"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mine pointed at Docker. Its disk image held 34 GB, mostly Rust build caches I could delete, and deleting them took free space from 70 GB to 99 GB. Everything else in my home folder was small. Far more space was in use than my folders explained, so I looked in the system's own folders, where System Data lives:&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; /private/var/db/&lt;span class="k"&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;-5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 34G    /private/var/db/powerlog
2.5G    /private/var/db/diagnostics
342M    /private/var/db/uuidtext
120M    /private/var/db/KernelExtensionManagement
 97M    /private/var/db/systemstats
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;powerlog&lt;/code&gt; is where macOS keeps its power and energy history. Five days later the whole folder was 275 MB. On 11 October, one file in it was 34 GB:&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; /private/var/db/powerlog/Library/PerfPowerTelemetry
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt;/&lt;span class="k"&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;-3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 34G    BackgroundProcessing/CurrentBackgroundProcessingDB.BGSQL
4.0M    BackgroundProcessing/CurrentBackgroundProcessingDB.BGSQL-wal
2.1M    ExtendedPersistence/CurrentLog.EPSQL-wal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What was writing it
&lt;/h2&gt;

&lt;p&gt;That file is a SQLite database. Anyone can read it, so you can open it read-only without &lt;code&gt;sudo&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Its biggest table, &lt;code&gt;BackgroundProcessing_TaskCheckpoint_24_5&lt;/code&gt;, had 723,677,084 rows. Each row records a background task changing state while &lt;code&gt;dasd&lt;/code&gt;, the macOS task scheduler, runs it. From the &lt;code&gt;BackgroundProcessing&lt;/code&gt; folder, this shows which tasks wrote the newest 20,000:&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;BackgroundProcessing
sqlite3 &lt;span class="nt"&gt;-readonly&lt;/span&gt; &lt;span class="s2"&gt;"file:CurrentBackgroundProcessingDB.BGSQL?mode=ro"&lt;/span&gt; &lt;span class="s2"&gt;"
  select (select Name from BackgroundProcessing_TaskMetadata_24_5 m
          where m.TaskID = c.TaskID limit 1) as task, count(*) as rows
  from (select TaskID from BackgroundProcessing_TaskCheckpoint_24_5
        order by rowid desc limit 20000) c
  group by task order by rows desc limit 5;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a healthy Mac it's a mix of ordinary jobs. This is mine five days later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0:com.apple.CloudTelemetry.submitNearRealtimeActivity|2178
501:com.apple.coreanalytics.analyticsagent.ambientlight|2090
501:com.apple.coreanalytics.analyticsagent.location|1089
501:com.apple.Safari.SafeBrowsing.BrowsingDatabases.Update|978
501:com.apple.mediaanalysisd.photos.person|950
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On 11 October it wasn't. Of the newest 200,000 rows, 199,859 came from two tasks, &lt;code&gt;com.apple.appstored.ArcadePostSummary&lt;/code&gt; and &lt;code&gt;com.apple.appstored.ArcadePostPO&lt;/code&gt;. Both belong to &lt;code&gt;appstoreagent&lt;/code&gt;, the App Store's helper. Both had an interval of zero, so each ran again the moment it finished. &lt;code&gt;appstoreagent&lt;/code&gt; sat at 148% CPU and &lt;code&gt;PerfPowerServices&lt;/code&gt;, which writes the log, at 51%. Those two alone kept about two of the Mac mini's ten cores busy around the clock, on a machine I thought was idle.&lt;/p&gt;

&lt;p&gt;To see how fast your log is growing, in rows a second:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sqlite3 &lt;span class="nt"&gt;-readonly&lt;/span&gt; &lt;span class="s2"&gt;"file:CurrentBackgroundProcessingDB.BGSQL?mode=ro"&lt;/span&gt; &lt;span class="s2"&gt;"
  select round(count(*) / (max(timestamp) - min(timestamp)), 2)
  from (select timestamp from BackgroundProcessing_TaskCheckpoint_24_5
        order by rowid desc limit 20000);"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mine said about 700 that day. Five days later it said 0.15. If your table names end in something other than &lt;code&gt;_24_5&lt;/code&gt;, run the same command with &lt;code&gt;.tables&lt;/code&gt; in place of the query to list them.&lt;/p&gt;

&lt;p&gt;The log began at 1 a.m. on 2 October, when I set up the Mac, and the loop was running by that evening. It had been filling the disk at about 3.5 GB a day ever since.&lt;/p&gt;

&lt;p&gt;The Mac had been on a developer beta of macOS 27 (build 26A5368g) since I set it up. I can't prove the beta caused this, and I can't see why the two tasks got stuck. But the loop started with the beta, and it's been quiet since I moved to the release build. To check what you're running, use &lt;code&gt;sw_vers&lt;/code&gt;. A build number that ends in a letter, like 26A5368g, is a beta.&lt;/p&gt;

&lt;h2&gt;
  
  
  What fixed it, and what didn't
&lt;/h2&gt;

&lt;p&gt;Quitting &lt;code&gt;appstoreagent&lt;/code&gt; did nothing useful. macOS started a new copy, and the new log showed the same two tasks at about 600 rows a second. &lt;code&gt;dasd&lt;/code&gt;, the scheduler that kept rerunning them, was at 98% CPU.&lt;/p&gt;

&lt;p&gt;Deleting the file didn't free the space either. macOS frees a deleted file's space only when the last process holding it open lets go, and something still held it. I never found out what, because &lt;code&gt;lsof&lt;/code&gt; without &lt;code&gt;sudo&lt;/code&gt; can't see it.&lt;/p&gt;

&lt;p&gt;A restart fixed both. When the Mac came back, the loop was gone. The log took 752 rows in its first ten minutes, spread across ordinary tasks, and the 34 GB was free again. Five days later, now on the release build of macOS 27.0.1, it's still quiet, and the file is 221 MB.&lt;/p&gt;

&lt;p&gt;If the same two tasks top your list:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delete that one file. It's macOS's record of background tasks for its energy reports, and macOS starts a new one. Leave the rest of the &lt;code&gt;powerlog&lt;/code&gt; folder alone, &lt;code&gt;BatteryLife&lt;/code&gt; included, since those are other logs.
&lt;/li&gt;
&lt;/ol&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; /private/var/db/powerlog/Library/PerfPowerTelemetry/BackgroundProcessing
   &lt;span class="nb"&gt;sudo rm &lt;/span&gt;CurrentBackgroundProcessingDB.BGSQL&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Restart. That stopped the loop for me, and it releases the space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An hour later, run the rows-a-second query again. If it's back in the hundreds, try moving off the beta to a release build, or signing out of Media &amp;amp; Purchases in System Settings and back in. I didn't need either, so I can't promise they work.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Where cntrl comes in
&lt;/h2&gt;

&lt;p&gt;cntrl didn't find this. I found it in Terminal, once the disk ran short. But cntrl's agent had been on this Mac mini since 4 October, and the loop was on Console's CPU chart the whole time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0560l2356cuaii5kh84.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv0560l2356cuaii5kh84.png" alt="The Mac mini’s CPU in Console, the seven days to 16 October." width="800" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each column is two hours. Its dark square is the average, and the light ones run from the lowest reading to the highest. Until the restart on 11 October, the average never fell below about 45%. After it, the average falls to a few percent, with bursts when there's real work.&lt;/p&gt;

&lt;p&gt;A machine that never goes quiet is worth a look. A Console rule for CPU above 40% for 60 minutes would have flagged this on the first day.&lt;/p&gt;

&lt;p&gt;cntrl can't look inside macOS's own databases, and it doesn't delete system files. It shows a machine's CPU, memory, disks and processes, now and over time, and alerts you when a reading stays over a line.&lt;/p&gt;

&lt;p&gt;If you'd like to see what that looks like, &lt;a href="https://try.cntrl.pw" rel="noopener noreferrer"&gt;try.cntrl.pw&lt;/a&gt; has six made-up machines, no account needed.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>apple</category>
      <category>debugging</category>
      <category>sqlite</category>
    </item>
  </channel>
</rss>
