Regaining disk space by disabling Mail log
Oct 21, 2019
Over the weekend, my father asked me to help him regaining some disk space on his MacBook Pro. As strange as it seemed to me, with iCloud's "Optimize Mac Storage" and all, his HD only had about 20GB of free space. He thus began archiving old pictures and looking around for big files by starting with ordering files and folders on the root level of the HD by dimension and keep on going deep on folders' structure to see what used that much space.
With much surprise to both of us, one of the largest folders we found was this one ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail, the content of which were few huge plain text files.
A quick look on the web brought us to this StackExchange forum entry pointing to a feature I wasn't aware of, or I had forgotten: Apple's Mail app can, on request, log to txt files every connection it makes to servers. While this may be useful for someone, it ended up occupying about 50GB of disk space on my dad's laptop, with some plain text files being as large as 33GB!
Since APFS brought fast file and directory sizing, looking for big files starting from the HD has become more comfortable and quick. The Storage panel under About this Mac is helpful for a routine check of big files, but in these cases, being able to investigate the HD itself proves very useful since it may allow you to spot some files that might go unnoticed and aren't of any use to you.
* * *
If you like articles like this, please consider supporting this website through personal donations or sponsorships