Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jdw13

macrumors regular
Original poster
Oct 2, 2015
156
37
Boston, Maine, Chile
I do not understand why "purgeable" disk space cannot be to used install/update and plan to report this inconvenience "bug" to Apple.

On my MacBook Pro with only 128G SSD disk, I could not use App Store to update Xcode (8GB) even though I had about 36 GB of available disk space with about 18GB of it "purgeable." An online search led to several utilities that claim to free the purgeable space, but I did not want to use them.
From the shell I found that it was not enough to create an empty 36GB file and remove it, but I found that filling the file with random data did the trick.
From the bash shell:

$ head -c 36000000000 < /dev/random > ~/Downloads/myfile
which aborted with out of space. With
$ rm ~/Downloads/myfile
there was only 3.56 GB of "purgeable" of the over 36 GB of disk space available.

If interested you may look at my "during_small" and "after" attachments of screen capture during and after the two shell commands.
 

Attachments

  • during_small.png
    during_small.png
    362.3 KB · Views: 289
  • after.png
    after.png
    535.6 KB · Views: 231

Hombre53

macrumors regular
Feb 27, 2018
246
263
I do not understand why "purgeable" disk space cannot be to used install/update and plan to report this inconvenience "bug" to Apple.

On my MacBook Pro with only 128G SSD disk, I could not use App Store to update Xcode (8GB) even though I had about 36 GB of available disk space with about 18GB of it "purgeable." An online search led to several utilities that claim to free the purgeable space, but I did not want to use them.
From the shell I found that it was not enough to create an empty 36GB file and remove it, but I found that filling the file with random data did the trick.
From the bash shell:

$ head -c 36000000000 < /dev/random > ~/Downloads/myfile
which aborted with out of space. With
$ rm ~/Downloads/myfile
there was only 3.56 GB of "purgeable" of the over 36 GB of disk space available.

If interested you may look at my "during_small" and "after" attachments of screen capture during and after the two shell commands.

Try Onyx, great software (free): https://www.titanium-software.fr/en/onyx.html
 

Rafterman

Contributor
Apr 23, 2010
7,267
8,808
"Purgeable space?" Did you try deleting Time Machine's local backlup cache? That often saves a ton of space.

(to disable it completely, and automatically free up the space, in Terminal, use: sudo tmutil disablelocal)
 

jdw13

macrumors regular
Original poster
Oct 2, 2015
156
37
Boston, Maine, Chile
Using TimeMachineEditor (another excellent utility) to disable local snapshots;
BTW, "sudo tmutil disablelocal" does not exit anymore:

$ tmutil | grep loc
Usage: tmutil startbackup [-a | --auto] [-b | --block] [-r | --rotation] [-d | --destination dest_id]
Usage: tmutil localsnapshot
Usage: tmutil listlocalsnapshots <mount_point>
Usage: tmutil listlocalsnapshotdates [<mount_point>]
Usage: tmutil deletelocalsnapshots <snapshot_date>
Usage: tmutil thinlocalsnapshots <mount_point> [purgeamount] [urgency]
$
 

Rafterman

Contributor
Apr 23, 2010
7,267
8,808
Using TimeMachineEditor (another excellent utility) to disable local snapshots;
BTW, "sudo tmutil disablelocal" does not exit anymore:

$ tmutil | grep loc
Usage: tmutil startbackup [-a | --auto] [-b | --block] [-r | --rotation] [-d | --destination dest_id]
Usage: tmutil localsnapshot
Usage: tmutil listlocalsnapshots <mount_point>
Usage: tmutil listlocalsnapshotdates [<mount_point>]
Usage: tmutil deletelocalsnapshots <snapshot_date>
Usage: tmutil thinlocalsnapshots <mount_point> [purgeamount] [urgency]
$

Doesn't work? Too bad. What does work is a way to remove specific snapshots, using two commands. I used it a few weeks ago, but I forget the exact syntax. Unless Catalina got rid of that too.
 
Last edited:

Sciuriware

macrumors 6502a
Jan 4, 2014
719
154
Gelderland
Doesn't work? Too bad. What does work is a way to remove specific snapshots, using two commands. I used it a few weeks ago, but I forget the exact syntax. Unless Catalina got rid of that too.
#! /bin/bash
#
# macOS Time Machine Snapshots cleanup.
#
# author J.F.Lanting
# since 20-Nov-2017
# version 1.003 12-Dec-2017

TMUTIL=/usr/bin/tmutil
OUTPUT=/Tmp/DeleteLocalSnapshots_$USER
#
#================= TEST IF TIME MACHINE IS ACTIVE ===========================================================

if [ -d '/Volumes/Time Machine Backups' -o -d '/Volumes/Time Machine Backups 1' ]
then
echo "Time Machine busy; scan skipped"
exit 0
fi

#================= SCAN FOR PENDING SNAPSHOT BACKUPS ========================================================

for I in `$TMUTIL listlocalsnapshots / | sed 's/.*TimeMachine.//'`
do
$TMUTIL deletelocalsnapshots $I
done

#================= LIST PENDING SNAPSHOT BACKUPS ============================================================

$TMUTIL listlocalsnapshotdates | grep 20 >$OUTPUT
if [ -s $OUTPUT ]
then
echo "PENDING SNAPSHOT BACKUPS:"
cat $OUTPUT
rm $OUTPUT
fi

#================= WRAP UP ==================================================================================

#============================================================================================================


.... still works.
;JOOP!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.