caveat lector: this whole essay is me rambling around, doing something very simple on my computer. It’s not helpful at all, just utter navel-gazing. I love my computer, so it’s fun for me, and perhaps no one else.
MacOS sporadically alerts me that my disk space is almost out. Usually, I delete whatever torrent I downloaded most recently and forget about it. But lately, I’ve decided to operate my computer more responsibly and figure out what’s taking up so much space.
Originally, I posted this question to 13chan, but I think it’s better to try solving it myself before finding out what /b/ said.
You see, despite my aforementioned torrenting habit, I use little disk space. Two movies on my computer, some images, and the apps I’ve installed. And yet:
O RLY? 200GB of disk space! On what?!
ChatGPT suggests I click the little Apple logo, then select “About this Mac”. Glad I asked, as this was not obvious to me.
A few years ago, I was arguing with my dev friend, Pancho, about the usability of Linux for the general population. He said MacOS was easy and intuitive. As a Mac user always running into problems and having a hard time, I argued that Linux was easier. He said, “yeah, but I’m pretty sure my grandma could use MacOS, but not Linux”. Nowadays, when I find myself doing something very technical to solve a basic issue, I remember that convo.
For example, one time I tried to open my home directory in Finder. When I open Finder, here’s what I see:
Where is my home? Eventually I gave up, opened the command line, typed cd ~ && open .”, and wondered what Pancho’s grandma would have done.
Anyway, I follow ChatGPT’s advice:
I imagine every person who’s ever opened this tool wanted the data ordered by size (from most to least). Vero quid sum ego (as my middlenamesake said) to question the regarded UI experts at Apple?
Two obvious culprits - System Data and Applications. Opening Applications, Chrome takes up 38GB! For comparison, Firefox takes up less than 1GB.
Either:
Chrome is bloatware, or
I really need to clear my cache
Hmm. Someone on usenet with the same problem was told to just delete Chrome. I mean… But I have a lot of stuff in Chrome. Too lazy to setup everything anew. Someone else from that same usenet thread says:
Have you checked to see how many versions the computer is holding? Right
click on the Chrome application and select "Show Package Contents". Then
check the Versions folder. You have a lot old versions still in the folder
Welp. I did this, and there is no Versions folder. Sigh. You know, I’m just gonna open the Chrome directory in the command line and do Unix stuff
➜ Google Chrome.app du -a . | sort -n -r | grep -i version | head -n 3
83219896 ./Contents/Frameworks/Google Chrome Framework.framework/Versions
1108856 ./Contents/Frameworks/Google Chrome Framework.framework/Versions/120.0.6099.71
1108856 ./Contents/Frameworks/Google Chrome Framework.framework/Versions/120.0.6099.62
Aha, so there are a bunch of old versions! I wonder why Chrome does this.
I’m just gonna delete them and hope nothing breaks :3
There’s one file called “Current” that I probably shouldn’t delete, but bye bye everyone else!
for OLD_VERSION in *
do
if [ "$OLD_VERSION" != "Current" ]
then
rm -rf "$OLD_VERSION"
fi
done
Update: had to uninstall Chrome. Posting from Firefox now lol.
So it turns out that Current symlinks to the most recent version. Which I just deleted. Goodbye, Chrome! For future reference, that script should except whatever Current points to. After I install Chrome, I’ll update the script and add it to a cronjob that runs every week or month, to prevent Chrome from eating up my disk with old versions.
38GB freed! First, I’ll uninstall a bunch of apps I don’t use. Let’s see how we’re doing now. Oh, also, some random support forum said to look in ~/.Library, so I’ll go there and delete everything that looks unimportant.
Okay, here’s our current disk usage:
Much better! I wonder why half shows up in Free and the other half in Other Volumes? What other volumes? Oh, I’m looking at this the wrong way. Here’s a better view:
So I’m still using 111GB, which still seems ridiculous (but a massive improvement already!) Where am I using the remaining data?
Reddit promises that CleanMyMac X is a good, legitimate tool, so I’ll try just throwing that at my disk and see what happens.
Nevermind! lol. How do poor people clean their disks without doing a lot of work? If any poor Mac users have done this without resorting to DrainMyWallet X (just being facetious, I’m sure it’s worth the price), please do leave tips, either here or in the thread on 13chan.
Speaking of, I think we’ve gotten far enough on our own (by which I mean, with Google and ChatGPT) that we can look at their advice:
Oh cool, maybe ncdu will help me find some things I’ve missed thus far!
It starts scanning things with a nice looking TUI, then gives me an interactive explorer of the directory I can it in, so see what’s using the most space:
Via this interface, the directory /Users/eliana/Library/Containers/com.utmapp.UTM/Data/Documents/Linux.utm/Images turns out to use up 8GB. It’s a Linux VM I used to run.
I deleted a ton of stuff like this, and found some interesting cases, like Homebrew uses way more storage than I thought for little accessories it needs. Plus some files that look important, but are tempting. For example, there’s a folder called /System/Volumes/Preboot/519DF0DD-D563-410D-B02C-150893BD8E65/cryptex1
Do I really need /proposed? Maybe not! Or maybe it’ll fuark my system and I’ll have to use my old ASUS that can’t boot without a USB to avoid certain rotten disks. I found a blogpost from Charlie Simeon (a former Mac repairman who has a really cool blog):
In conclusion, cryptexes are an important part of macOS to ensure that malware or malicious users cannot tamper with the operating system and it's core tools. Please do not attempt to modify your built in preboot volume or cryptexes folders.
Hmm. It’s important for security? But, I’m a dev (kind of). My mac has like 8 different half-finished Node.js apps on random ports, and none of them have any security. Whatever, I’ll be a good boy and leave it in place. Though I’m reminded of how fast TempleOS manages to run, due to having no security whatsoever.
Checking Disk Utility one more time…
I guess that’s good enough for now!
Next post will be doing the same on Linux to see if Pancho was right XD
UPDATE:
I found out that Disk Utility wasn’t updating correctly after I used 13chan’s approach. Here’s the new disk usage (after rebooting):
Dulcis victoria!