What Is TRIM?
TRIM is a command that your device sends to the SSD to delete data within storage blocks that are of no use anymore. It aids in the optimization of the SSD write performance. The more data blocks are free, the better the SSD performs.
Another notable aspect of TRIM is that it safeguards the SSD from premature failure. By preventing the SSD from aggressive cleaning, it stops too much pressure on the memory chips. This ATA or Advanced Technology Attachment command is compatible with SSDs with the SATA interface. Apple only uses TRIM on the SSDs that the brand has itself certified.
SSD uses the garbage collection process to erase data blocks that are no longer needed. The TRIM is precisely complementary to this process. It enables the OS to direct the SSD to the data pages of a block that must be erased. That way, the SSD controller can handle the data storage space efficiently.
With TRIM, you can:
- Eliminate copies of invalid data pages.
- It saves time and increases the efficiency of the SSD performance.
- The TRIM command directs the SSD to overlook the invalid data during the garbage collection process.
- If the SSD has fewer pages to move, it will enhance the SSD's life.
How to Run TRIM Command on Mac?
Apple introduced the trimforce command in macOS X 10.10.4. It enabled users to opt for third-party SDS to run TRIM.
However, if you want to check if TRIM is operating on your Mac quickly, you can do it by going to About This Mac > System Report > Hardware section > SATA/SATA Express heading. Then scroll down the right pane until you locate the TRIM Support option. If it's not enabled, then you can go ahead and enable TRIM.
Check out the steps to run the TRIM command on Mac –
Step 1. Go to Applications. Select the Utility folder.
Step 2. Once it is opened, you need to open the Terminal app.
Step 3. Type the command —sudo trimforce enable. Press Enter or Return on your keyboard. Enter the admin password. Read the message and enter Y.
Step 4. It will then prompt—Are you sure you wish to proceed (y/n)— Press y and then enter to proceed to the next instruction.
Step 5. The next message will display—Your system will immediately reboot when this is complete. Is this okay (y/n) ?— Press y again and enter, and it will display "Enabling TRIM".
Step 6. Finally, you will get the message that enabling TRIM was a success, and the mac will restart once.
Once a TRIM command is given, and garbage collection is done, it's highly unlikely that anyone, even a forensic scientist, can retrieve the data.
How to Disable TRIM in Terminal on Mac
Since TRIM looks like a powerful tool, why would anyone want to disable it? Since it removes or frees up blocks that are not required, it also means that if you delete a file, recovering it will be impossible with TRIM working in the background.
Disabling TRIM is as easy as enabling it. Here are the steps you must follow –
Step 1. Select Applications. Choose Utilities. Open the Terminal.
Step 2. Type sudo trimforce disable. Press Enter or Return. Enter the admin password. Read the message and enter Y.
Step 3. Follow the instructions on-screen to deactivate TRIM.
While it makes the TRIM SSD recovery a possibility, you should know that it will also impact the performance and lifespan of the SSD. Without active garbage collection, the overall read and write speed can also drop significantly; however, these days, SSD hardware and onboard software also manage the performance of the SSD, and TRIM is just one tool in the list of performance management,
So if you did recover your files, you should reenable it once it's done.
TRIM is an ATA command that directs the SSD to erase data blocks. You can easily enable and disable the command by following the above steps. With the TRIM command, you can quickly improve the SSD's performance.
In this post, we have shared details about the TRIM tool and how you can enable it on MacBook and later disable it. We have also explained when you should do it and why it's essential to keep it enabled.
Was This Page Helpful?
Daisy is the Senior editor of the writing team for EaseUS. She has been working in EaseUS for over ten years, starting from a technical writer to a team leader of the content group. As a professional author for over 10 years, she writes a lot to help people overcome their tech troubles.
Written by Dany
Dany is an editor of EaseUS who lives and works in Chengdu, China. She focuses on writing articles about data recovery on Mac devices and PCs. She is devoted to improving her writing skills and enriching her professional knowledge. Dany also enjoys reading detective novels in her spare time.
What Is Clipboard and How to Copy and Paste? [Full Guide]
What Is DCIM? What Does DCIM Stand for? [Beginner Guide]
Working With Thumb Drive& Get the Difference Between It and a Flash Drive
7 Days to Die Save File Location [Every Detail You Want to Know]