Skip to content

Instantly share code, notes, and snippets.

@svenmuennich
Last active June 25, 2021 09:30
Show Gist options
  • Save svenmuennich/13118a723514bd2a3c700178fba82d2c to your computer and use it in GitHub Desktop.
Save svenmuennich/13118a723514bd2a3c700178fba82d2c to your computer and use it in GitHub Desktop.
Clearing "purgeable" space on macOS High Sierra (e.g. before installing Windows 10 using BootCamp)
# 1. Check for any local time machine snapshots
tmutil listlocalsnapshots /
# 2. Ask time machine to free 100 GBs of local snapshots. Third parameter '4' probably means high priority (https://apple.stackexchange.com/a/398356)
tmutil thinlocalsnapshots / $((100 * 1024 * 1204 * 1024)) 4
# 3. Make sure that only a `(dataless)` snapshot exists
tmutil listlocalsnapshots /
# 4. List all mounted volumes and find the one mounted on '/' (probably '/dev/disk1s1')
df -h
# 5. Free space on the volume mounted on '/', e.g.:
diskutil secureErase freespace 0 /dev/disk1s1
# If this still does not work, disable automatic time machine backups and try steps 2. and 5. again...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment