Monday, April 17, 2017

Issues with macOS Sierra "purgeable" storage?

Monday, March 23, 2020 - 10:45 PM - Bowling Green, KY
Update - this method does not work on APFS on newer versions of macOS.

Monday, April 17, 2017 - 5:12 PM - Bowling Green, KY

Hello everyone! I know it's been some time since I posted on this blog. But, I wanted to share with you all something I discovered the other day.

I noticed that a lot of my storage on my MacBook Pro was being taken up by "System" files. Upon investigating, I found out that Xamarin had stored a lot of Android simulator images and files in my home Library folder. Once I deleted this content, via the terminal, I discovered my Mac was reporting 160 GB+ space as "purgeable". Although the data had effectively been removed, it was not in the Trash, and I could not get rid of the space.

That's when it occurred to me - I wonder if a free space wipe would resolve this problem? So, I used the command:

diskutil secureErase freespace 1 /dev/disk3s4

[http://www.macworld.com/article/1139688/os-x/erasefreespace.html]

This process took several hours to complete. Fortunately, I performed it while I was sleeping. One thing to note is that the drive listed in this example will not be the same for everyone. For my machine, it was /dev/disk1. For others, it may be /dev/disk#s#, or /dev/disk#.

This process lowered the "purgeable" space on my Mac from 160+ GB down to 6 GB. So, if you're having issues with macOS' "purgeable" space reporting a large number, even after massive file deletion, try a free space wipe. It should do the trick.