Was doing some Users folder housekeeping, where did all this BLOAT come from?

BigP

Ars Centurion
347
Subscriptor++
Super short version is that I recently decided to do some housekeeping for my personal files, which pretty much just meant copying all my old RAW photos for the DSLR and everything from my collective iPhones onto an external SSD for cold storage. I hardly look through everything anymore and exported the good shots that were worth processing in Lightroom anyway. I ended up moving about 160GB out of my home directories and figured that would be a substantial slimming of my files.

Then I actually started checking Get Info for various folders. . . My full home directory is now 720GB. This was a bit of an eye popper since I thought I was still under half a terabyte. More digging showed that my Library folder alone is 456GB of that. Within that Library folder, just two folders add up to 360GB which is fully HALF of my total usage: Application Support at 278GB and Metadata at 82GB. I'm not hurting for space since I keep my Home folders on a 2TB external SSD, I just have a tough time believing that I use that much space.

I can kinda understand the Application Support folder although I worry that there may be a metric boatload of duplicate files involved somehow. Music and photos and other documents all live in their proper places. The Metadata folder is the weird one since virtually all 82 of those gigs are in the form of skg_knowledgeEntry.NNNN files which can be anywhere from 1 to over 100MB and are created several times per day. Neither Google nor Apple support are helping me understand what these are.

Does anyone have any experience trying to clean out file cruft and know if it's generally okay to do so or if it's better to leave well enough alone? This is on an M1 Mini running Sonoma.
 

gabemaroz

Ars Scholae Palatinae
1,287
What applications do you have installed on your system?

If those files are being written continuously, check your login items and background processes for anything frequently writing to the disk to get an idea of what it might be.

Edit: Did some research. The skg_knowledgeEntry.NNNN files are related to Spotlight indexing.
 
Last edited:

Honeybog

Ars Scholae Palatinae
2,075
I go through various Library folders and remove cruft monthly, but it’s hard to give general advice, since Application Support can include a whole lot of stuff.

If you use Steam, that’s where game files live (Application Support > Steam > Steamapps > Common), which might explain the huge size.

By and large, Application Support will have files related to apps currently installed or installed previously. It’s down to you to remove them, but I’d avoid deleting anything you don’t recognize, since not all developers observe good practice in naming their folders, so you might lose something you care about.

An 82 gigabyte Metadata folder is huge (mine is about 2.5gb). I’m hesitant to suggest deleting anything, but it’s probably worth looking up how to rebuild the index.
 

eas

Ars Scholae Palatinae
1,254
The largest folder in my ~/Library/Metadata is CoreSpotlight.

As I understand it CoreSpotlight are the indexes that are have been stripped out of the original filesystem spotlight index, like those for Mail. Poking around, it looks like it might include indexes for file providers -- Mine includes iCloud and OneDrive. I suspect there is a lot more in there as well because I think this is where Apple is indexing a lot of activity data.

As for Application Support, what are the largest folders? My largest is CloudDocs.
 

BigP

Ars Centurion
347
Subscriptor++
As for Application Support, what are the largest folders? My largest is CloudDocs.
Funny you should ask that. . . I spent a couple of hours before making this thread trying to figure out a way to script or automate or shortcut or anything really that would just list out the size on disk of the 1st-tier subfolders within a folder and sort them large to small. . .

That went exactly nowhere since I have zero coding/scripting background since TurboPascal in high school. I ended up Cmd-A-ing them all and hitting Get Info resulting in 108 windows to click closed. Not a fan, really, so I haven't yet done that for the Application Support folder. But it's looking like that will be faster than any other option!

An 82 gigabyte Metadata folder is huge
I've been digging into this one specifically today and it looks like all of this is related to Siri and its knowledge agent and such. I have deliberately avoided using Siri since the beginning so I'm about to look into how to disable that more specifically. I looked into the files it's been making and they appear to be related to my Messages conversations (names and phone numbers legible, sometimes text snippets (from different conversations though) and the rest Unicode characters).

I am overdue for updating to the latest OS so perhaps I ought to do that first and see if that helps anything. . .
 

BigP

Ars Centurion
347
Subscriptor++
Well, in the Application Support folder, surprising absolutely no one, Steam was the heavyweight at 165GB. For two games: Civ VI and Baldur's Gate 3 (144 of those). Those are the actual .app files which I was expecting to see in my Applications folder but what do I know? (Obviously not much!) I'll leave that alone then.

I did decide to directly nuke the 80-ish gigs of Siri stuff (and doing an OS update didn't fix that, my computer has happily made six new skg_... files since rebooting. . .) as well as some years-old phone and iPad backups.

All in all, that's actually not too bad. Before BG3 and the Siri stuff (which based on the timestamps seems to have started up at about the same time, no idea if related), I really would have been just under half of a TB like I thought I'd be. Next purchase I guess I'll have to shell out for at least 2TB of built-in SSD but that's part of a rant I'm about to post in the other thread. . .

I guess the moral of this story is keep Siri locked in a cage and purge the ancient device backups.
 
  • Like
Reactions: Honeybog

Cranioclast

Ars Legatus Legionis
10,110
Subscriptor++
Funny you should ask that. . . I spent a couple of hours before making this thread trying to figure out a way to script or automate or shortcut or anything really that would just list out the size on disk of the 1st-tier subfolders within a folder and sort them large to small. . .

That went exactly nowhere since I have zero coding/scripting background since TurboPascal in high school. I ended up Cmd-A-ing them all and hitting Get Info resulting in 108 windows to click closed. Not a fan, really, so I haven't yet done that for the Application Support folder. But it's looking like that will be faster than any other option!
From a command line in your Application Support folder:

du -sh * | sort -r

That will give you a human-readable summary of the disk usage for all items, sorted largest to smallest.
 
  • Like
Reactions: grahamb

gabemaroz

Ars Scholae Palatinae
1,287
I ended up Cmd-A-ing them all and hitting Get Info resulting in 108 windows to click closed. Not a fan, really, so I haven't yet done that for the Application Support folder. But it's looking like that will be faster than any other option!
You can use Option+Cmd+i to open a single 'Get Summary Info' that will persist throughout the Finder and allow you to go item by item or as a group with a single Get Info window.

You can also change the view to "Show items as list" in Finder. After that, Cmd+j to show view options. Click the "Calculate All Sizes" box at the bottom. Then you can drill down into folders as necessary. You can arrange by size in the list view by clicking the column header.

Screenshot 1.png
 

BigP

Ars Centurion
347
Subscriptor++
After that, Cmd+j to show view options. Click the "Calculate All Sizes" box at the bottom.

DING DING DING!!!!

THAT'S what I was missing! I work pretty much only in List view and was pretty miffed by the fact that folders were always -- in the Size column. I've now made that the default for all folders. I think I owe you a frosty beverage of your choice!
 
  • Like
Reactions: gabemaroz

gabemaroz

Ars Scholae Palatinae
1,287
  • Like
Reactions: grahamb