Islam Adel
Architect & IT Expert

Select your language

How to remove purgeable files in macOS and reclaim free space

After deleting Files on a macOS SSD, free space is not directly available.
This behaviour is intended to save the read/write cycles of the SSD.
Unless you begin writing new files, which require the purgeable space, macOS begins to free up space.

Sometimes you want to install Applications, which fails due to not enough space, although you actually removed enough files.

With this Terminal Command you can remove the purgeable space

What is does, is generating one big file as big as the purgeable space, wait few seconds and deleting it again, so that the OS has to really clear it.

Open Terminal and paste the following one liner and hit Enter

gb="$(df -h / | grep /dev/ | awk '{print $4}' | sed 's/[^0-9]//g')"; echo gb=$gb; dd if=/dev/zero of=/tmp/gb_filename bs=1024 count=${gb}000000; sleep 600; rm -f /tmp/gb_filename