Update: This may not work with AFPS filesystems. See comment nr 2 below this post.
From macOS Sierra, Apple introduced some space-saving features in their OS. One of those features are saving content in the cloud. When you turn this feature on it can save photos, movies, email attachments, and other files that you seldom use in iCloud. The file will stay the same place on your computer, but download at demand when you need it. Purgeable space are files that are safely stored in iCloud and can be deleted on your physical drive by the system.
I decided to really test this feature.
I have a big photo collection from over 10 years, its about 850GB in RAW files. I wanted to have every file available to me when I use the laptop and not having to drag an external drive along. The only problem is that SSD storage is extremely expensive so the laptop I use have 512GB internally.
So I started Apple photos and started importing photos (using this script: Import Folders Into macOS Photos). It started to upload the images to iCloud, but after a while I got messages about the drive being full and the upload stopped. I had to delete some files in the library to get it to upload again. When the initial 350GB upload was done I expected to get some more free space because I had turned on “Optimize Mac Storage” in Apple Photos. But I never got more than about 12GB free.
I let the computer sit for an entire day, but the available space remained the same. (Around 12GB). That didn’t cut it when I still had 400GB to upload. So I started searching the web about how to free purgeable space, but as I have found out the OS itself controls this. Meaning you can’t set a target size yourself. However you can fool the system by coping large files to the drive.
What I would do is use a termal command you see in the selection below:
So this creates a 20GB file but I had to wait until Apple Photos app had finished uploading. I then proceeded to duplicate this file a few times. After that I deleted the files I made and doing this gave me more “real” free storage. So now I could upload the rest of my images.
I believe that when you do this, it makes the system think that you suddenly need a lot of storage and it will free up purgeable space for you. But I am not entirely sure how the process work to be honest here.
Another way to force remove Purgeable space on Mac
You can use a mac maintenance application like Clean My Mac X to do it for you. This app is made by the same people that develop Gemini 2: The Duplicate Finder, currently rated as “editors choice” in the App Store. A lot of mac claners are pretty fishy, but Clean My Mac X is legit and will work fine. You can read more about it here: Prepare for macOS Mojave with CleanMyMacX (Review). It has a lot of other cleaning features in addition to cleaning purgable space.
The link to CleanMyMac X is an affiliate link, and purchasing the software will give me a small percentage of the sale to help paying to run this site.