How do I delete Purgeable Space on a Mac?
How do I delete the Purgeable Space on Mac OS?
Mac Studio, macOS 14.1
How do I delete the Purgeable Space on Mac OS?
Mac Studio, macOS 14.1
If deleting Time Machine local snapshots didn't help you reclaim much free space, try the method below.
A more efficient way to delete purgeable space on Mac is by making a file that grows until the disk is full and then deleting the file. It's worth mentioning that previous attempts to create an empty file and then duplicate the file until it uses up your Mac's free space to force your operating system to clear purgeable space to store the file no longer works with APFS.
How to purge Mac hard drive with command lines:
Here is a short bash or zsh script that works:
#!/bin/bash
# Bin-bash script to remove purgeable file space
# Created on 20241205
# Change username in this script to Your user name by using FINDER - GO - HOME
# To Run script
# Open Terminal and type:
# bash /Users/username/Documents/DEPURGE/DEPURGE_generic.sh
# Create a text file with zero bytes then fill with lots and lots of zeros
set -x # Set Debugging Mode - Print each command as done
# set -e # Remove "#" sign for seeing Exit on Error for Debugging
cd /Users/username # Change to ~/HOME directory
touch text.txt # Create a zreo byte file called text.txt
# Fill text.txt with 100000 ZEROS at a time till no more space
dd if=/dev/zero bs=100m of=/Users/username/text.txt status=progress
# Delete LARGE ZERO file called text.txt
rm /Users/username/text.txt
echo "!!!! GoTo Macintosh Disk then select Get Info for Pureable Space !!!!"
echo " "
read -p "Do you want to loop again? (y/n): " answer
if [ "$answer" = "y" ] || ["$answer" = "Y" ]; then
bash /Users/username/Documents/DEPURGE/DEPURGEV3.sh
fi
# END OF SCRIPT
exit
Enjoy!!
that doesn't magically happen either from what I and others here have experienced, the OS may never release the space until forced to do so and apparently the OS upgrade and other 3rd party application operations can't account for it and get blocked.
@arek.r see various workable solutions in the discussions above for how to force a release of the space by creating temp files etc
Here is a short bin Bash script that will reduce pureable space - usually has to be run a few times:
#!/bin/bash
# Bin-bash script to remove purgeable file space
# Created on 20241205
# Change username in this script to Your user name by using FINDER - GO - HOME
# To Run script
# Open Terminal and type:
# bash /Users/username/Documents/DEPURGE/DEPURGE_generic.sh
# Create a text file with zero bytes then fill with lots and lots of zeros
set -x # Set Debugging Mode - Print each command as done
# set -e # Remove "#" sign for seeing Exit on Error for Debugging
cd /Users/username # Change to ~/HOME directory
touch text.txt # Create a zreo byte file called text.txt
# Fill text.txt with 100000 ZEROS at a time till no more space
dd if=/dev/zero bs=100m of=/Users/username/text.txt status=progress
# Delete LARGE ZERO file called text.txt
rm /Users/username/text.txt
echo "!!!! GoTo Macintosh Disk then select Get Info for Pureable Space !!!!"
echo " "
read -p "Do you want to loop again? (y/n): " answer
if [ "$answer" = "y" ] || ["$answer" = "Y" ]; then
bash /Users/username/Documents/DEPURGE/DEPURGEV3.sh
fi
# END OF SCRIPT
exit
ENJOY
It's a Miracle!
Apple have descended from the Ivory tower & fixed it!
Albeit days after an update to 15.3
It gets better!
They have even fixed (for a while I'd expect - but don't bet on it!) df & du to show more
accurate data about space usage. The person in Apple that actually did this deserves
accolades!
df...
Filesystem Size Used Avail Capacity Mounted on
/dev/disk3s1s1245G 11G 174G 7% /
/dev/disk3s5 245G 52G 174G 23% /System/Volumes/Data
/dev/disk8s1 1000G 769G 231G 77% /Volumes/MyHome
/dev/disk7s2 2000G 993G 1007G 50% /Volumes/MyMacMiniBackup
du -shx WhatImInterestedIn...
23G /Volumes/MyHome/me/Library/Containers/com.apple.mediaanalysisd
9.0G /Volumes/MyHome/me/Library/Application Support/MobileSync/Backup/
Those are not unreasonable numbers - at least I'm happy with them for now!
Please convey my congratulations to the person in Apple that fixed these problems
that should never have happened & we look forward to better communication with
Apple & improvement in their technical support...
Who have 2 options for all problems,
Reboot
Log off removing all iCloud sync, then log back in.
Sorry there's a third now, total reinstall!
They really do not work!
Good programming does!
Analysis of all cache files is required - please get the software engineers (another name for
programmers) on to it, it's called appropriate maintenance!
Do not assume that 3rd party stuff & community user advice will solve bad programming
practice!
Another possible area to recover storage space is thru the local snapshots created by Time Machine (that is if you use Time Machine).
The deletions are done with Disk Utility.
hi see my post above from 9/26 with a solution, filling up the disk with random data should force the OS to fully purge, it's a dopamine hit to watch
VikingOSX:
Thank you for your efforts to help me. It sure is appreciated.
I did as you instructed then shut down and restarted, and in the 'System Settings - General - Storage, 'Macintosh HD' Does show I have 250 GB more...
However in Disk Utility, 'Macintosh HD' (Data Volume on sidebar) does Not show any change. It still shows 259 GB purgeable. - Also, a 'Get Info' on the Folder in Finder shows the same.
Is there another Step that I missed please, that causes this discrepancy?
Thank you again,
Randall
The purge command resets disk cache the same as a reboot would do. I wouldn't spend any more mental time on wondering what Disk Utility is reporting and just let macOS take care of that for you.
I am on my Mac from early morning to late at night and I never care about any purgeable storage, or even run Disk Utility for that matter.
Thank you Viking OSX, I won't worry about it then. I am on my Mac Studio all day and evening too. I run Parallels and Windows 11 in coherence mode.
I do like to be proactive with disk space and backup. I have 2 x 2-TB SanDisks running Time Machine. I like redundancy.
Thank you again for all your help. May God Bless you.
Randall Goold (in AZ)
The last time I read about Time Machine and two disks used for backup, I thought I read that it would alternate the backup between the drives and not write them concurrently with the same backup.
Use Time Machine on your Mac to back up to multiple disks - Apple Support
Hello,
my problem is similar, 180 gb available but 165 purgeable resulting in 15 free
when trying to install a newer version of Mac OS >> not enough free space.
And deleting large file doesn’t do anything.
i backed up my music library 50 gb. (Trashed it & empty the trash) It just increased both values but free space remain 15.
the purge didn’t change anything
thx for your help.
I am also having grief with purgeable space on my MacBook Pro. I am running Sonoma 14.6.1.
I have run sudo purge from a terminal and no relief. I have rebooted and shutdown an restarted multiple times.
I know that the purgeable space is some video files that I have edited and copied back to my NAS the moved them to trash and emptied the trash. I feel that when I empty the trash the filed should be deleted and the space recovered.
I even tried running first aid in the disk utility and still the purgeable space remains.
i think you need to understand it's not about dopamine but getting a job done: i can't download footage i need to work with, because the frame.io app doesn't recognize that i have 700gb purgeable space and just says i have only 20gb of free space. now you can go on all day long how frame.io didn't code their app correctly but some of us just need a solution to a considerable problem, not an ill informed lesson on how apple will magically do everything and one should just lay back.
How advanced a file system is does not matter when the data/statistics being produced prevents things from happening.
Linux/Unix tools might look at the available file system space to determine if an action is feasible (like copying some huge image file). The output of "df" becomes critical. So when "df" on my 1TB SSD says it only has 100GB available it simply won't do the copy. Of course, if you look via Finder, et. al. it says there's 500GB free since there's 400 purgable. Then we start down the path of trying to figure out how to get the output of "df" to actually show the truly available amount of space. Which means trying to get the OS to force the purging.
I would say that APFS is too advanced for its own good. Or at least Apple needs to polish off a lot more of the rough edges. Either fix the statistics being reported OR provide a much easier way to do the purging.
Note: in my case those timemachine snapshots were taking up the space. And timemachine IS up to date - I verified that multiple times. And rebooted. No joy. I'm going to let things take some time to "self-heal" before I take "drastic action" and remove those timemachine snapshots by hand. Seriously, I did not expect to end up down here in these weeds...
FYI: Since most Macs use SSD/NVMe storage, and each storage cell has a limited number of writes before it wears out.
Running the provided script too many times, and you will degrade your Macs ability to store new data.
How do I delete Purgeable Space on a Mac?