Forum Discussion
Why deleting files does not free up space on mac
The command diskutil secureErase freespace 0 /dev/disk1 is designed to overwrite the empty areas of your drive with zeros. It does not delete files you've already removed — it works on the space that macOS already thinks is free.
But here's the key twist: when deleting files does not free up space on Mac, that "free space" often isn't truly recognized as free by the system. The space is being held hostage by:
- APFS snapshots
- Purgeable files
- Stale file system metadata
secureErase freespace forces the disk to physically write zeros to every block marked as "available." In doing so, it triggers macOS to re-evaluate what's actually free.
Normally, when you delete a file, macOS just removes the pointer to that data. The actual data remains until overwritten. But when deleting files does not free up space on Mac, the problem is rarely leftover data — it's that macOS has "reserved" that space for snapshots or caching.
Running diskutil secureErase freespace accomplishes two things:
1. It forces macOS to release purgeable space – Because overwriting free space requires the system to first decide which blocks are truly free versus which are held by snapshots.
2. It updates the free space counters – After the secure erase completes, the operating system must recalculate available space from scratch, often revealing the gigabytes you thought you deleted hours ago.