Enable TRIM commands on third-party solid-state drives.
Syntax trimforce verb verbs enable Start sending TRIM commands to AHCI-attached third-party drives. Requires a reboot to take effect. disable Stop sending TRIM commands to AHCI-attached third-party drives. Requires a reboot to take effect. help Display brief usage syntax.
trimforce will exit with status 0 if successful, or with an appropriate error if it cannot parse input, allocate memory, or is unauthorized to perform its work.
TRIM is designed to allow the operating system to inform a solid-state drive (SSD) which blocks of data are no longer considered in use and can be wiped internally.
By around 2014, many SSDs had internal background garbage collection mechanisms that worked independently of trimming. Although this successfully maintained performance even under operating systems that did not support trim, it had the associated drawbacks of increased write amplification and wear of the flash cells.
After a TRIM command has been issued and garbage collection has taken place, it's highly unlikely that even a forensic scientist would be able to recover the data.
The trimforce utility first appeared in OS X 10.10.4, Yosemite.
“First rate people hire other first rate people. Second rate people hire third rate people. Third rate people hire fifth rate people" - André Weil
Related macOS commands:
rm - Remove files
rmdir - Remove folder(s)