The best way to expand your Mac’s lifespan and obtain a significant speed boost is by replacing the hard drive with a solid state drive (SSD). You’ll notice the huge performance improvement right from the first time you boot up and immediately praise yourself for making this investment. However, you shouldn’t stop at installing a new SSD. There is one tiny command line you must type into Terminal to enable a feature meant to expand the lifespan of the newly installed drive; this feature is called TRIM.
What Is TRIM, and Why Do You Need It?
Writing to an SSD is totally different than writing to a traditional hard drive: the SSD first clears existing information from the flash memory cells and programs new data into them; hence, the writing process is often referred as program/erase cycles or P/E cycles. There is one thing to note, though, and that is that there are a limited number of P/E cycles an SSD can support. Writing to an SSD is like writing on a piece of paper with a pencil: if you erase the same space too many times, it can wear out. Manufacturers address this issue with so-called wear leveling, which prevents SSD memory cells (the pages) from wearing out.
Mac os high sierra version 10.13.6 - Forum - MacOS High Sierra Sierra - Forum - MacOS Onyx mac high sierra - Forum - MacOS. THEN, try the cache clearing in OnyX, this DOES work for some. Finally, if nothing yet has helped, reinstall macOS (same 10.13.2) from a USB bootable installer. I have an external USB enclosure with a spare SSD, which has a dedicated partition that I made for the latest 10.13.2 installer.
SSDs contain memory cells organized into pages and blocks. What represents a challenge is that with an SSD you can write on a page any time, but you can erase only one block at a time. Each block contains a specified number of pages (from 32 to 256), which contain a specified amount of data (2 to 8KB). Unlike traditional hard drives, data on SSDs can’t be directly overwritten. When data changes, it must be written again. The same data (and metadata) ends up being written over and over again in our daily use of computers generating a phenomenon called write amplification, which uses up the limited P/E cycles.
Download CleanMyMac X from MacPaw’s website and clean up to 500MB of junk data from your computer while enjoying all the features of the software without major limitations.
TRIM can be considered a more efficient way of handling “garbage” and was introduced shortly after SSDs became available. The TRIM command allows the operating system to inform the SSD about regions where the data marked for deletion are stored, and after trimming the SSD won’t preserve the contents of the block when it writes new data to a page. This enables less write amplification and, as it doesn’t use up the precious P/E cycles, the SSD’s lifespan will be much longer.
Back Up Your Mac Before Enabling the TRIM Command
You need to enable trimming manually when installing a third party SSD. All Macs shipped with an SSD have TRIM enabled, however, and yours can be checked by clicking on the Apple logo > About This Mac > System Report > SATA/SATA Express and look for “Trim Support”. Note that this won’t work on Retina MacBook Pro (late 2016) units.
If the answer here is “no” and you are running either macOS El Capitan 10.11.x or macOS Yosemite 10.10.4 or later versions, then TRIM can be enabled with one simple command in Terminal. Earlier versions of macOS don’t support this command, but there are third party apps, such as TRIM Enabler ($14.99), that can enable it.
Before you enable TRIM on the freshly installed SSD, we highly recommend doing a manual backup with Time Machine (or the backup service of your preference). Do not skip this step, because – despite supporting it – Apple doesn’t take any responsibility for data loss during the process. If anything goes wrong, the data will be lost and you won’t be able to recover it, so a backup can save the day.
But you don’t want to fill up your backup drive or the precious space on the SSD with all the junk files generated by apps as you use them: cookies, cache files, duplicates, erroneous downloads, iOS firmware downloads and much more should be wiped. For this reason, we strongly recommend performing a system cleanup using a Mac optimization app such as CleanMyMac, MacBooster or OnyX. After the cleaning process your Mac will be in its best shape for a backup and then to enable TRIM.
How to Enable TRIM on macOS in Five Easy Steps
To expand the lifespan of your SSD, follow the steps below:
- Launch Terminal.
- Type the command sudo trimforce enable, and press enter.
- Type the admin password, and press enter.
- Read the system notice, type “y”, and press enter.
- macOS will require your consent to reboot after finishing the process, so type “y” again, and press enter.
After finishing the process your Mac will reboot with TRIM enabled. Check again if TRIM support is now “OK” by clicking on the Apple logo > About this Mac > System Report > SATA/SATA Express, or by typing the following command in terminal:
system_profiler SPSerialATADataType | grep ‘TRIM’.
Best Mac Optimization Software of 2021
Rank | Company | Info | Visit |
| |||
| |||
|
Get the Best Deals on Mac Optimization Software
Stay up to date on the latest tech news and discounts on Mac optimization software with our monthly newsletter.
What are maintenance scripts?
Mac’s OS X has a built-in function to keep your system from getting bogged down with old files that are no longer needed.
Every Mac has three versions of its maintenance scripts — daily, weekly, and monthly — that handle clearing out different unnecessary files as well as some additional system upkeep like reporting network statistics and rebuilding the so-called locate and whatis databases. Regular maintenance makes it easier to keep your Mac in top condition, rather than trying to resolve issues once they’ve already taken hold.
On older OS X versions Mac maintenance scripts used to be automatically scheduled to run at a certain time (03:15 for daily scripts, Saturday at 03:15 or 04:30 for weekly, and the first of the month at 05:30 for monthly). These are times when your Mac system expects to have a little down-time to get its housekeeping done.
Why run maintenance scripts? Can't Mac clean itself?
The arrival of macOS Sierra in 2016 introduced some self-cleaning features on the Mac. What was previously done by scheduled maintenance scripts is now performed by the macOS itself without you even knowing. This is what the macOS cleans automatically on your Mac:
- Apple-related cache
- Apple’s Temporary files
- Twin downloads in Safari
- Unused fonts, languages, and dictionaries
Nice progress, you say. Yes, but still that barely scratches the surface in terms of real system cleanup. What’s been left out is third-party cache, temporary browser files and all sorts of media. By the way, there are more than one Trash bin on your Mac (each app has its own trash folder) and they have too be cleaned as well. As a final clincher, here’s a fact: Places you viewed on Google Earth 4 months ago, are still there, deep down inside your Mac’s system folders.
A healthy way to use maintenance scripts
As we’ve seen even newer Macs need regular “under-the-hood” optimization to run well. There are dedicated apps that willtake the job off your shoulders. You can see Maintenance Scripts in action with CleanMyMac X. Launch the app (it has a free version), run the maintenance scripts tool and see how it affects your computer performance. This should rotate certain system logs, rearrange libraries and lots of other technical tasks known only to developers.
Next, we'll explain how to run Maintenance scripts manually, but if you want the job done and forgotten, run CleanMyMac X.
- Download it here (free download).
- Launch CleanMyMac.
- Click Maintenance > Run Maintenance scripts.
Or you can try the manual way, which might be exhausting and time consuming.
The default time for maintenance scripts assumes that there will be minimal if any interference to the Macs user during this period, which makes sense: whether working late or starting early, half past five in the morning isn’t peak productivity time.
But the thing is, when we switch off for the night we turn the Mac off completely. After all, we don’t want to waste money powering a computer while we’re sleeping or risk being disturbed by notifications. But if your Mac is turned off at the time scheduled for maintenance scripts, it will fail to run them, and chances are it will fail again the next morning and the morning after.
If the maintenance scripts aren’t getting the chance to run, old files and junk caches begin to build up and affect your system performance.
How to check when maintenance scripts were last run
Onyx Mac 10.13 6
Maybe you’re not sure when your Mac was last able to run the full trio of maintenance scripts. Maybe it’s been a while since it ran any at all. If you’d like to check, you will need to enter the Terminal application.
1. Use either the Spotlight application to search for Terminal, or navigate to its location by selecting Applications from the sidebar of a Finder window, from there selecting Utilities and then double-clicking on Terminal.
2. In the Terminal command bar, enter
It’s important to enter the command exactly as above, including spaces.
3. Pressing Enter will bring up a list of when (date and a time) a maintenance script was run and what type of script it was (daily, weekly, or monthly). If the scripts are running automatically, you will see timestamps for their default times (03:15, 04:30, or 05:30).
If the logs are showing that your maintenance scripts haven’t been run for a while, it’s recommended that you run a manual script.
How to Run Maintenance Scripts through Terminal
We’ve already looked at how to use Terminal to check when a maintenance script was last performed by your OS, but you can also use it to manually run a maintenance script.
How To Run Onyx On Mac
Note: you will need an administrator password to run maintenance scripts through Terminal.
1. Open Terminal either through the Spotlight search or by navigating to the Utilities folder in Applications.
2. In the Terminal command bar, enter
3. Enter the above text. Press Return, and you will be asked to enter your administrator password. For security reasons, your password will not appear onscreen.
4. Your Mac will then perform three maintenance scripts. There won’t be a status bar or percentage to show that the scripts are being run, but you’ll know they’re complete when the Terminal prompt returns.
If you only want to perform one maintenance — perhaps you’ve missed your monthly script, or you have limited time – then you can edit the Terminal command to be simply sudo periodic monthly, which you should enter into the Terminal.
An alternative to manually running Maintenance Scripts on macOS
If typing code into Terminal seems a bit daunting, there is third-party software that can run a simple scan for you to clear out the junk, such as CleanMyMac. It offers a thorough system cleanup to keep your Mac running on only the files you need.
CleanMyMac X has a clear, easy to use interface to run maintenance scripts without going into Mac’s Terminal function. Simply select Maintenance from the left sidebar and from there you can select which maintenance tasks your system currently needs.
What Is Onyx Software For Mac
Or, if you just want to run a general scan, CleanMyMac’s Smart Scan quickly checks your Mac for files that are safe to remove, organizes them into categories (System Junk, Photo Junk, Mail Attachments, iTunes Junk, Trash Bins, and Large & Old Files) and tells you how much space you’ll save by deleting them. Scan your system and delete unused, forgotten files to free up data for system performance.
Onyx For Mac 10.14.6
Download CleanMyMac X to handle your maintenance and keep your Mac running smoothly without the unnecessary bulk.