Forum Discussion
Anyone know a good file shredder for mac for permanent data deletion?
The built-in command line tool has a native function (secureErase) to let you delete files permanently from a Mac.
secureErase is a disk utility command in macOS Terminal for securely erasing hard disks or partitions, ensuring that files cannot be recovered by overwriting data multiple times (optionally 1, 3 or 7 times).The command supports two modes: disk (erases the entire disk) and freespace (overwrites only unused space), and is available for both mechanical and solid-state drives (SSDs). For SSDs, although physical overwriting may be limited by wear leveling, it can still effectively protect data when combined with FileVault encryption key destruction.
Note: The operation is irreversible and time-consuming, and requires a power connection.
Enter the following command to view the disk identifier. Locate the primary disk identification (e.g., /dev/disk2).
diskutil list
Use the secure erase command (replace diskX with the actual identification):
diskutil secureErase freespace 0 /Volumes/Macintosh\ HD
0 means single overwrite, replace with 1 (3 times), 2 (7 times). This operation overwrites free space only, make sure the drive is formatted first.
If feel it too complicated, then you can use the best file shredder for Mac for completely data deletion.