Mar 30, 2020 How to free up disk space on Mac OS automatically? We recommend you to use CleanMyMac X. This program allows you to keep your hard drive in a good state with the help of various applications such as junk files cleaner, shredder, system performance optimizer and etc. Download CleanMyMac X right now and clean your Mac hard drive easily and fast! To free up disk space, it’s helpful to know exactly what is using disk space on your Mac. A hard disk analysis tool like Disk Inventory X will scan your Mac’s hard disk and display which folders and files are using up the most space. You can then delete these space hogs to free up space. How to Free Up Space in Windows 10 and MacOS. Where the OS will show you a few files that can usually be safely be cleared up. If you use Mac, simply install CleanMyMac X.
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.
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.
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.
TIL about Purgeable Disk Space in OSX, and after hours of struggling, how to reclaim it.
Purgeable Disk Space is a “feature” of more recent versions of OSX. It is storage on your hard drive that the operating system sets aside for files that it thinks you might access again in the future.
An example of files that are moved to purgeable space
is files that you send to your remote iCloud storage. Presumably, you are sending files to the cloud to free up space on your local machine… if there is space available locally on disk, though, OSX will keep these files around in purgeable space
which speeds up accessing the files again from your local machine.
In my opinion, it’s a bit of a silly assumption on behalf of the OS to keep files around that the user is asking to send to remote storage.
I ran in to issues with purgeable space when trying to partition my hard drive for a Windows installation. I had over 40GB of my hard drive confined to purgeable space, and even though that storage counts as “free” from an OSX perspective, it is still technically allocated. This prevented me from being able to pull in as many GB in to my Windows partition as I needed.
Even though I haven’t experienced it, I have also heard of folks running in to issues installing games or downloading large files onto their machines, and hitting the purgeable space wall.
There has to be a way to reclaim purgeable space from the OS, right?
It isn’t as easy as it sounds.
There are apps like cleanmymac3 which offer to clean purgeable space on your machine (for a fee) but I wanted to find a way to reclaim this space without the need for a paid service.
Purgeable space
is freed when you ask the operating system to store a new file
that exceeds the amount of true free space left on disk.
For example, if I have 15GB of space left on my disk, 5GB is truly “free” and 10GB is purgeable, If I create a file that is 6GB large, I will use up the rest of the “free” space and 1GB of purgeable.
Once the file that reclaimed the purgeable space is deleted, the space goes back to being truly free, instead of purgeable again!
So the trick is to create enough large files locally that all of the purgeable space is reallocated to support the new large files. After deleting those files, your space will return to a truly free state, instead of returning to purgeable.
One important caveat that I learned while attempting this solution: if you create a big file locally, and duplicate it over and over again with cmd+c/cmd+v
or cmd+d
, your disk space will not be properly filled up. This is an OSX trick to try and conserve hard disk space for duplicate files, by just creating new references to the original file instead of brand new copies of the file itself.
This is a good feature in most scenarios, just not in our immediate case where we actually want to fill up our disk as fast as possible.
See my step-by-step instructions for creating large files and duplicating them in the next section:
Open your terminal by searching for terminal
in spotlight (open spotlight with cmd+spacebar
)
mkdir ~/largefiles
dd if=/dev/random of=~/largefiles/largefile bs=15m
After a few minutes (around 5), hit ctrl+c
in the terminal window to kill the command from step 3.
cp ~/largefiles/largefile ~/largefiles/largefile2
cmd+d
or cmd+c/cmd+v
on the file… it’s forcing the file to be copied over in its entirety, filling up more space on disk.largefile2
to something different each time. largefile3
, largefile4
, etc…disk critically low
message from OSX, execute rm -rf ~/largefiles/
empty the trash bin
as well, or the files will just sit in there taking up space!disk utility
in spotlight The procedure above was inspired from this stack overflow post.
I hope the above was helpful! Feel free to reach out to me if you’re still having trouble freeing the purgeable space on your mac.