MacAttorney, the FREE Newsletter for Macintosh Using Attorneys






TABLE OF CONTENTS

1) Repair Disk Permissions


2) Run Routine Maintenance Scripts


3) Clear Caches


4) Do A File System Check And “Repair Disk”


5) Defragment A Hard Drive That Is Low On Free Contiguous Space


6) Check S.M.A.R.T. Status


7) Clear Your Desktop


8) Reset (or ditch) Safari


9) Delete Flash


10) Rebuild Mail’s Envelope Database


11) Check For Malware and Adware


NOTE #1: More On Defragmenting Your Hard Drive


NOTE #2: Routine Maintenance Or Troubleshooting Technique?


Software Mentioned On This Site, And Where To Get It.


About The Author


Macintosh Routine Maintenance

       By Randy B. Singer


I've created this site because so many Macintosh users have expressed frustration that they don't know how to perform routine maintenance on their Macintosh computer. Unfortunately, there is a huge amount of misinformation going around on the subject. Even Apple has contributed to the confusion with conflicting tech notes on their Web site. With the assistance of a few, mostly free utility programs, routine maintenance under OS X is very easy. The problem for most users is figuring out which utilities to use, and how and when to use them. This site will tell you that.

Just a little routine maintenance can make a Macintosh that is acting old and slow run like it was new again! It can also banish vexing spinning beachball cursors, rid you of "out of memory" error messages, and keep your valuable data from being lost.

The Philosophy behind this site:

This is not (necessarily) a site for experts and power-users. What I recommend here is what I see as the easiest, quickest, surest, least intimidating, and least expensive way to accomplish valuable routine maintenance. If you enjoy inputting arcane commands at a UNIX prompt, if you know UNIX inside and out, if you have money burning a hole in your pocket for commercial software with lots of questionable features, or if you enjoy playing around with the features of powerful (and potentially dangerous) software that you don't really understand, this site isn't meant for you. I freely admit that there are other ways to do the routine maintenance suggested on this site, but the procedures that I recommend here are designed to be the best ones for the average Macintosh user.

I've tried to make it easy as possible. I tell you what you should do, and what you should do it with, and roughly how often. If you are an average user, you can just follow my recommendations and be happy that you have done what is necessary. If you want to know more...the "why," or the other options, or any controversy that exists in the Macintosh community over the need for these procedures, I've provided a "Discussion" section for each bit of routine maintenance, as well as a bunch of linked citations.

There are several very common myths circulating about Macintosh maintenance. I don't know anywhere else where they are all acknowledged in one place. I have endeavored to mention them all on this site. Look for the headings: "Maintenance Myth".

This Web page doesn't cover troubleshooting hardware problems. For instance, many, maybe even most kernel panics (i.e. system crashes)
http://support.apple.com/HT200553
are caused by hardware problems such as bad RAM, problematic USB hubs, etc. 

Disclaimer: When using any software utility that makes changes to your hard drive's system or structure, there is always the slim possibility that things can go horribly wrong. So, it is always a really good idea to have an up to date backup of all of your important data before using any software utility. Actually, it's just simply a good idea to always keep a backup of your data in any case, because hard drives are notorious for failing when you would least expect them to and you can least afford them to. For backup software, I suggest that you check out:
SuperDuper ($28)
http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html
and that you purchase an external hard drive to backup to. At this time I prefer and highly recommend Glyph Studio external hard drives for backup purposes:
https://www.glyphtech.com/product/studio

If you are experiencing a problem with your Macintosh, performing all of the suggested routine maintenance found on this page will often fix the problem. If it doesn't fix the problem, and you are still encountering problems with slowdowns and/or seeing the rotating rainbow beachball cursor, see:

Macintosh Beachballs!
http://www.macattorney.com/rbb.html


Macintosh Slowdown Solutions
http://www.macattorney.com/sd.html

Return to Table Of Contents



1) Repair Disk Permission

Disk Utility no longer has a "Repair Permissions" feature, because it is no longer necessary.  Permissions are immutable in the Mac OS version 10.11 (El Capitan) and later.
http://www.macobserver.com/tmo/article/os-x-el-capitans-deletion-of-repair-disk-
permissions-could-impact-you
So this is no longer a routine maintenance item (or even a troubleshooting/repair item).


Return to Table Of Contents



2) Run Routine Maintenance Scripts

The Macintosh operating system (OS) runs its own built-in maintenance routines, sometimes called "cron jobs", or "maintenance scripts", automatically between 3:00 am and 5:30 am each day. (There are daily, weekly and monthly scripts).
http://support.apple.com/kb/HT2319
The thing is that these scripts do just about nothing of great importance.  If they don't run for weeks, it's just not a big deal.  So, despite the fact that these are called "maintenance scripts," don't get concerned if they haven't run in a while.  Don't ignore this entirely, though, because if your Mac has a minor problem, in time failure to run the maintenance scripts will allow your Mac's hard drive to fill up with a bunch of invisible log files filled will messages about that minor problem.  If your hard drive were to completely fill up, your Mac wouldn't run anymore.

You can find a rundown of what the built-in maintenance routines do at:
http://arstechnica.com/civis/viewtopic.php?f=19&t=454874
https://discussions.apple.com/message/8906776#8906776

Prior to Mac OS 10.5, if you didn't leave your computer on 24 hours a day, or if you left it on but you let it go into sleep mode at night, these routines weren't run.   As of Mac OS 10.5 and later your Mac will run its maintenance scripts automatically at the next available opportunity if you put your Mac into sleep mode all night.  Though the scripts still won't run if you shut your Macintosh down at night.

NOTE: As of Mac OS 10.5 the maintenance scripts are no longer handled by the UNIX facility "cron", they are now handled by a similar facility called "launchd,"  This is only important to know because some techs still refer to the Mac's "cron jobs" even though technically there is no such thing anymore.

If you decide that you want to run the maintenance scripts manually  (e.g. because you shut your Mac down each night and they haven't run in ages), you can use this free utility:

MAINTENANCE (free)
https://titanium-software.fr/en/maintenance.html

Discussion.

If you want to be sure that the built-in maintenance tasks have been run, the daily, weekly and monthly maintenance scripts each write the details of every run into their own log file, which you can check.

Open the Console application (located at: Applications/Utilities/Console), go to:
File --> Open Quickly --> /var/logs/. Select "daily.out", "weekly.out" or "monthly.out" for the maintenance logs.

Return to Table Of Contents


3) Clear Caches

Even though running the routine maintenance scripts clears out some temporary files (see item number 2, above), none of the system caches are touched by them.

Occasionally caches become corrupted, impacting the performance and stability of your Mac.  So it is a good idea to every rare now and then use a utility that clears the system caches, and/or your Internet browser caches.

Deleting caches won't hurt anything. However, over time a cache speeds up your computer (assuming that you do some things repetitively, and you almost certainly do), so if you aren't experiencing any problems, you should probably leave your caches alone. On the other hand, if it has been ages since you have flushed your caches, or if your computer is running slowly, or if you are experiencing odd problems, it might be a good idea to flush them. Use your discretion.  (In other words, this isn't something that you should be doing every day, or every week, or even every month.)

MAINTENANCE is a free program which, among other useful things, cleans out system and Internet browser caches.  You can get MAINTENANCE from:
https://titanium-software.fr/en/maintenance.html

Application caches are easily uninstalled or trashed manually, but should probably be limited to instances where an individual application is running slowly or erratically:
http://support.apple.com/en-us/HT201516

Note that Booting into Safe Disk Mode automatically clears the Apple ATS (Apple Typographic System) font caches. However it doesn't clean out other kinds of caches. 

Discussion:

According to MacAddict, October 2005, page 20, it is a good idea to occasionally clear out application-specific caches. They specifically recommend clearing out the two main cache folders in Mac OS X.

While Apple doesn't recommend doing this routinely, they indicate that it is a good idea in certain situations:
http://support.apple.com/kb/HT1199
Item #3. 

Return to Table Of Contents



4) Do A File System Check And “Repair Disk”

I recommend that you occasionally restart your Mac, and hold down the Shift key right after the startup chime is played, and keep it held down until the spinning black bar cursor appears.  There is  no need to hold down the Shift key past the time that the spinning bar cursor appears.
https://support.apple.com/en-us/HT201262
This procedure invokes what Apple calls a "Safe Boot":
https://support.apple.com/en-us/HT203176
and your Mac will report that it has been booted (started up) into Safe Boot mode. During startup in Safe Boot mode your Mac will do a file system check, entirely in the background, with no working status indicated, or report generated, and any problems will automatically be repaired.

It may take a while for your Mac to start up in Safe Boot mode. Be Patient.  Once it has fully started up, you should immediately restart your Mac normally, because certain files are deactivated when you startup in Safe Boot mode.

Note: A wireless or Bluetooth keyboard might make it difficult to startup in Safe Boot mode.  
https://www.cnet.com/news/how-to-manage-os-x-boot-options-with-wireless-keyboards/

Update: Some recent models of Mac seem to have depreciated Safe Mode and/or won't let you boot into it.
https://discussions.apple.com/thread/5485131
https://discussions.apple.com/thread/3750015

Instead you may prefer (or need) to check your hard drive, and repair any problems, by starting up in "Recovery mode" (by holding down Command-R during startup) and then running Disk Utility/Repair Disk:
https://support.apple.com/en-us/HT201314

Discussion:

Longtime Macintosh users know that in the past running Apple's Disk Utility/Repair Disk sometimes didn't fix serious problems you might experience with your hard drive. In such cases, users often resorted to using the commercial product Disk Warrior, which could perform near miraculous feats of repair. It was also an invaluable tool for routine preventative maintenance. Recently Disk Utility/Repair Disk has become much better at repairing damaged hard drives. So the question is, is Disk Warrior still an invaluable utility to have?' 

The answer is that Disk Warrior is a marvelous tool...when you need it. Fortunately, your Mac just about never needs it anymore. For instance, you don't need to run Disk Warrior routinely as a preventative measure. (Though doing so, if you already own Disk Warrior, isn't a bad idea.) The Mac OS is plenty stable without having to constantly rebuild its directory. And so, in my opinion, there is no need to purchase Disk Warrior (for about $120) unless a situation arises where Disk Utility/Repair Disk reports that it can't repair a problem with your hard drive. This is not to demean Disk Warrior. When you do need Disk Warrior, because your disk directory has developed errors that Disk Utility can't fix, it is a godsend to have.
https://www.alsoft.com/

Note that at this point, Disk Warrior does not support drives formatted as APFS (a more recent disk format) rather than the older HFS+. Since internal hard drives both solid state hard drives and rotating disk hard drives (SSD's and RDHD's) under Mojave and Catalina are non-optionally automatically formatted as APFS, discussion of the need for and/or the utility of using Disk Warrior is moot. It just won't work.

There are other ways to run a file system check/Repair Disk under the Mac OS, such as by running the command "fsck" from the Terminal, but these are more advanced ways to do exactly the same thing, that I don't think that the average user needs to know about.
For more information than you need, see:
https://support.apple.com/en-us/HT203176

Return to Table Of Contents



5)  Defragment A Hard Drive That Is Low On Free Contiguous Space

WARNING: You should never, ever, attempt to defragment a solid state hard drive (SSD)!
http://helpdeskgeek.com/featured-posts/should-you-defrag-an-ssd/

Most recent Macs have SSD's instead of the older rotating disk hard drives (RDHD's).  Though RDHD's are still popular when you want a large amount of storage space in your Macintosh, because they are much cheaper than SSD's in larger capacities. 

SSD's themselves need no periodic maintenance.  There is built-in software in recent versions of the Mac OS called TRIM that keeps them running at peak performance:
https://en.wikipedia.org/wiki/Trim_(computing)

Macintosh Myth #3: Most folks with an opinion will probably tell you that Mac's (with internal rotating disk hard drives) never need to have their hard drives defragmented.

Here is a quote from a MicroMat technician, that I think is very insightful:
"The claim that installations of Mac OS X on HFS+ volumes do not fragment is a myth believed by people who do not have disk optimizers that allow them to see how much fragmentation their disks have. It is an example of ignorance that is not able to be removed by any amount of evidence. I think theologians call that 'invincible ignorance'. It is now a widespread form of the pollution of information space."
http://is.gd/5VKgNv

Actually, Some Macs running OS X can benefit quite a bit from defragmenting their hard drive. But not for the reason that you might expect. There is often little in the way of performance to be gained by defragmenting your hard drive. But defragmenting your drive can stave off some very flaky behavior, out of memory errors, and possibly even data loss as your hard drive begins to get very full.

The Mac OS handles "file" fragmentation (a file being broken up into chunks and strewn across your hard disk) automatically, and fairly well, every time that you launch a fragmented file under 20MB.
http://forums.macrumors.com/archive/index.php/t-13383.html

But the Mac OS doesn't handle "drive" fragmentation (small bits of free space between files) well at all. In fact, the Mac OS is prone to huge amounts of drive fragmentation.

Drive (as opposed to file) fragmentation under the Mac OS is mostly irrelevant with respect to performance, as long as it isn't severe. Where drive fragmentation becomes important is when there are no longer any large contiguous chunks of free space left on your drive for the Mac OS to use for working space, for virtual memory, temp files, databases, etc. When this happens, the Mac OS can start acting flaky, and eventually, in extreme cases, it will suffer from data loss.
http://www.cnet.com/news/does-mac-os-x-need-a-disk-defragmenteroptimizer/

I used to recommend that folks defragment their hard drive when it was approaching 80% full (no matter how large the drive is), because I've heard from so many folks who were experiencing out-of-memory errors and flaky behavior at this level (no matter how large their drive was), and defragmenting invariably fixes the problem. But I've heard from a number of users who made heavy use of their drive, and they have experienced the problem as early as around 60% full. And other folks won't experience the problem until their drive is well over 80% full. Clearly how you use your drive makes a difference as to when, or if you run out of free contiguous space on your hard drive.

So now, instead of using a rough rule of thumb on when you should consider defragmenting your hard drive, what I recommend is that folks check to see how much free contiguous space there is on their drive routinely, once their drive is over 50% full. You can do this quickly and easily with the free program:

iDefrag (free)
https://coriolis-systems.com

(I'm aware that Coriolis Systems is now defunct and that iDefrag, though still downloadable for free, is unsupported.  I'm afraid that there is still nothing that compares to iDefrag, and there is nothing else that I would recommend.)

There is no need to purchase anything until and unless you need to. When you have no large chunks of free contiguous space left, you can expect problems to begin to appear if you don't defragment your drive. Note that if you let this problem advance too far, it may become impossible for any utility to work on your drive, protesting that there isn't enough free space on your drive for it to be able to run. (This despite the fact that you may have many gigabytes of "total" free space left on your drive.)

You may never need to defragment your drive (prior to purchasing a new one because the old one is becoming too full) or you may need to do so much earlier than you would expect, but by checking with one of these free tools you won't have to guess whether it is necessary or not.

If your drive needs to be defragmented, the "only" hard drive defragmentation utility that I recommend is iDefrag. (See my comments about other hard drive defragmentation utilities in Note 1. below) It is the only one that I know of that can optimize the files on your hard drive in a totally Mac OS-savvy way. The Mac OS has a journal, a hot band, virtual memory, metadata, etc. to keep track of. It is very important that these things be located properly on the disk or performance will be compromised.

iDefrag is the only hard drive optimization tool that does this perfectly (despite what some of the other companies that make hard drive defragmentation tools say).

Another option, instead of defragmenting your hard drive with a software utility program, is to simply purchase a new, bigger hard drive; copy all of the data on the old drive to the new drive, and then reinitialize (i.e. wipe clean) the old drive and start over with it. Moving all of your data from one drive to another will automatically defragment your data. Though it won't optimize it.

You have to reinitialize your data on the old drive for this plan to work, because if you just move "some" data from your old drive to your new drive, the old drive will still be badly fragmented, and without defragmenting the old drive it will still probably be flaky. (That is, even if you free up some space on the old drive, there more than likely still won't be the large chunk of contiguous free space available that the OS needs to run properly.)

Defragmenting your hard drive prevents any unusual behavior from your OS because it creates contiguous space, combining fragments of space strewn all over your drive into one large chunk of space.

Note that clearing off data from your drive, even a large amount of data, without also defragmenting, may not create enough "contiguous" space to keep your Mac running well.

Discussion:

Definition of Terms:
Types of fragmentation:
1) "File fragmentation, where file are broken up and are not contiguous
2) "Drive" fragmentation, where, though files may be contiguous, the free space on the drive is fragmented.

"Defragmentation" means that things (that is, data, e.g. files and applications, and free space) are made contiguous (that is, not broken up into small bits and strewn about at different places) on your hard drive.

"Optimization" means that not only is the drive defragmented, but data is put where it should be and/or is put where it will provide optimum performance.

Let's refer to files A, B, C and D, and free space "__".

Here is a drive with no file fragmentation. All the files are contiguous, but free space is fragmented. In other words, there is no file fragmentation but there is disk fragmentation:
AAAAA__BB__CCCCC__DDD_

Here is a drive with both the files and free space fragmented:
AA__BBA__CCCCCB__DDDAA_

Here is a drive with no file or free space (disk) fragmentation. All of the files are contiguous, and all of the free space is contiguous:
AAAAABBBCCCCCDDD__________

Now, take a look at that first example, where there is a lot of disk fragmentation even all of the files are contiguous. Have you ever run a Mac with too little RAM? It was a dog, wasn't it? That's because your Mac was hitting your disk in a big way, using virtual memory instead of RAM for tasks. Now, think of the effect that you might see if you forced your Mac to use hundreds of little spaces all over your drive to write virtual memory to, instead of having it written to one big contiguous space. That's why drive fragmentation is more important than file fragmentation.

The Mac OS automatically defragments files. The Mac OS doesn't do any drive defragmentation at all.

Note that if you actually defragment your hard drive as part of a routine maintenance program (rather than just keep track of how much free contiguous space is available), let's say every coupe of months, then it won't take long to defragment your drive each time, and any potential problem will never rear its head. In addition, you should be able to use close to every last gigabyte of space on your hard drive, and you will always have every last ounce of performance that your Mac can give you as as side benefit.

See Note #1 below for more information on file defragmentation. 

Return to Table Of Contents



6) Check S.M.A.R.T. Status

The old saying that "all hard drives die eventually" is still true.  It's even true for SSD's, despite the fact that they have no moving parts. It would be nice to know in advance when a hard drive is going to fail. That way you would have time to backup your data before your drive ultimately met its end. S.M.A.R.T. (Self-Monitoring Analysis and Reporting Technology) is a feature built into most modern hard-drives that acts as an "early warning system" for pending drive problems. The Mac OS has this ability built-in. Disk Utility, which comes with the Mac OS (it is in your Application/Utilities folder), can tell you the S.M.A.R.T.-status of your hard-drive. Unfortunately, you have to remember to regularly launch Disk Utility to check this. (See below for free utilities that will automate this process.)

To check your drive's S.M.A.R.T.-status using Disk Utility, launch Disk Utility and select your internal hard drive in the left column. If at the bottom of the window it says "Verified," your drive is in good shape. If it says: "About To Fail" you need to:
1) Not shut down your computer and hard drive until you have done the following...
2) Back up your hard drive, which you should do immediately, if you haven't already done so.
Hard drives on their last legs often will finally fail by refusing to start up.

I've been told that there is no hope for an internal drive once it reports "Failing" as its S.M.A.R.T status. If your drive is "failing," it's time to get a replacement drive.

Volitans' SMART Utility ($25 for a 10 copy license) is different from other similar utilities which only read the overall S.M.A.R.T. Status. SMART Utility goes farther and displays the individual attributes tracked by S.M.A.R.T in an easy to read format so that you can see their status and information, and it also uses its own internal algorithm based on those attributes to detect drives failing before S.M.A.R.T. normally would. This pre-fail detection can save your data well before S.M.A.R.T. has determined that the drive is failing.
https://www.volitans-software.com/apps/smart-utility/

Note: FireWire and USB hard drives (that is, external hard drives), even if their internal mechanism is S.M.A.R.T.-enabled, can't be checked for S.M.A.R.T. status using Apple's Disk Utility.  However, you might be able to check the S.M.A.R.T. status of your external hard drive by downloading the demo of SMART Utility:
https://www.volitans-software.com/apps/smart-utility/
After installing SMART Utility you will need to install the optional SAT SMART Driver (from the SMART Utility menu) in order to see any external drives. That will tell you your external drive's current S.M.A.R.T. status, as well as monitor to see if any new problems crop up.  Another option, for those who are much more advanced is:

OS-X-SAT-SMART-Driver
https://github.com/kasbert/OS-X-SAT-SMART-Driver
https://github.com/RJVB/OS-X-SAT-SMART-Driver/blob/RJVB/SATSMARTDriver-0.5
0.dmg

Discussion:

There was a study released by Google:
http://research.google.com/archive/disk_failures.pdf
Failure Trends in a Large Disk Drive Population, which concluded that S.M.A.R.T. wasn't a reliable predictor of drive failure.  (Note: Anecdotal feedback from users to this Web site's author indicates that Volitan's SMART Utility's proprietary algorithm does give a reliable prediction of hard drive failure.)

More information on S.M.A.R.T. technology:
http://en.wikipedia.org/wiki/Self-Monitoring%2C_Analysis_and_Reporting_
Technology
 

Return to Table Of Contents



7)  Clear Your Desktop

In the past, moving things to a location other than on your desktop was an easy and free way to pick up better performance.


It's not entirely clear when it happened, but it's clear that years ago Apple changed the entire way that the Mac OS works with regard to your desktop.  It's no longer necessary to keep your desktop as clear as possible to avoid a performance hit.  Your desktop can be as messy as you want it to be!

Return to Table Of Contents



8) Reset (or ditch) Safari

It's not unusual to see Safari slowdown occasionally.  It used to be easy to fix that by choosing the Reset command in one of Safari's menus.  As of Mac OS 10.10 (Yosemite), Safari no longer has a reset function.  Have a look at this article for how to reset Safari now:
http://www.macissues.com/2015/06/22/how-to-fully-reset-safari-on-your-mac/


However, I have a better idea.  Ditch Safari.  I know that many users think that Apple's own software is exceptional, but in the case of Safari I'm sad to report that Apple is well behind the curve.  Safari is on the slow side, it isn't the best with regard to security, and it's a lacking with regard to features.  I recommend that you download a better (and yet still free) browser!  (There is no need to trash Safari.  The two won't conflict.)


Brave Browser (free)
https://brave.com/

More info about Brave:
https://en.wikipedia.org/wiki/Brave_(web_browser)

Brave is FAST.  It blocks trackers and can even use the Tor network for extra security.  It blocks ads without the need for an add-on.  Brave is based on the same code base as Google's Chrome, only with all of Google's spyware stripped out.  If you try Brave for a while, you will find it hard to go back to an inferior browser like Safari.

Return to Table Of Contents



9) Delete Flash

"Flash" is a technology that has been used on the Web for a long time to do streaming video and animation.  However, it has been almost entirely replaced by new, more modern technology.  That's good, because Flash has been, in the past, a security hole that bad guys have taken advantage of.

Adobe, developers of Flash, will be sunsetting Flash at the end of 2020.  In fact, most browsers will automatically uninstall Flash after that.
https://www.wired.com/story/adobe-finally-kills-flash-dead/

If you have Flash installed on your computer, now might be the time to uninstall it.  If you are wondering if you have Flash installed, you can check by going to this Web site:
http://www.adobe.com/software/flash/about/

You can uninstall Flash with this uninstaller:
https://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html

Return to Table Of Contents



10) Rebuild Mail’s Envelope Database

Ever since Mac OS 10.4, all archived messages in Apple’s Mail program have been kept in individual Finder-readable files. There are no archived messages in Mail's database.

This is a good thing.  Some other e-mail programs, notably Microsoft’s Entourage, store all of your messages in one big monolithic database.  If the database in a program with a monolithic database becomes corrupted and unrepairable, you can lose all of your archived mail.

Mail works by storing information such as senders, recipients, subjects, etc. in a SQLite database. Mail’s performance can lag, and it can become less stable, as you store more and more archived messages in it.

Periodically deleting old, unwanted e-mail messages, and rebuilding Mail’s "envelope" database, will usually give Mail a very noticeable performance boost, and help ensure continued trouble-free operation.

Since there are no archived e-mail messages stored in Mail’s database, it is quite safe to rebuild Mail’s database, because if something goes wrong with the rebuild, you can just start over, having lost nothing.

Every now and then (or, ideally, routinely as you use Mail) you should go through all of your mailboxes in Mail and delete all of the messages you no longer wish to keep. Then, in Mail, choose:
Mailbox menu --> Erase Deleted Messages --> In All Accounts
to purge all deleted messages.

After doing this, quit Mail.

Now you are going to rebuild Mail's envelope database.  You can do this manually, via a script, or using the Terminal.  I'm going to tell you how to do it manually, since that's the easiest way to do it.

There is one problem.  With every new version of the Mac OS, Apple has siightly changed where Mail stores its archived e-mail files.  To rebuild the Mail database, do this:

- Quit Mail.
- Go to your user Library folder by holding down the Option key in the Finder, and then choosing:  Go menu --> Library
- In your user Library folder, find the "Mail" folder.
- In the Mail folder will be a folder named "VX" (where "X" is some number). 
- Inside the "VX" folder will be a folder called "MailData".
- Inside the "MailData" folder move any files that begins with “Envelope Index” to your desktop.  These can have all sorts of names, such as:

Envelope-Index
Envelope-Index-shm
Envelope-Index-wal
Envelope Index..tmp

Don't worry about their exact names, or how many files that you have, just move the ones that begin with "Envelope Index" or "Envelope-Index" to your desktop. 
- Now close everything up.

Launch Mail and fresh new Envelope Index files will be created automatically.  This can take a while if there are a lot of archived e-mail messages for Mail to go through.  You should see very noticeably improved performance from Mail after doing this!

http://brettterpstra.com/2012/09/15/vacuuming-your-mail-app-index-still-works-
wonders/


http://www.fixkb.com/2013/03/apple-mail-application-very-slow-to-respond.html

http://machow2.com/mail-not-working-in-el-capitan/

Return to Table Of Contents


11) Check For Malware and Adware

There is very little malware (defined as malicious software) in the wild for the Macintosh.  In fact, the only folks who will tell you that there is malware that you have to be concerned about are folks trying to sell you anti-virus software.  Indeed, the Macintosh OS has several levels of malware protection built-in:

XProtect/File Quarantine/Gatekeeper/MRT/SIP

http://en.wikipedia.org/wiki/Xprotect

https://en.wikipedia.org/wiki/Gatekeeper_(OS_X)

https://support.apple.com/en-us/HT201940

http://www.macworld.com/article/1165408/mountain_lion_hands_on_with_gatekeeper.html

http://www.thesafemac.com/mmg-builtin/

https://eclecticlight.co/2018/01/20/just-what-do-xprotect-and-mrt-protect-your-mac-from/

https://eclecticlight.co/2017/12/21/lockrattler-4-1-for-el-capitan-sierra-and-high-sierra-is-now-finally-released/

https://blog.malwarebytes.com/101/2019/02/macos-protect-malware/

So the overwhelming majority of Mac users do entirely without any third party anti-virus software, and yet, you never hear of a Macintosh user legitimately complaining that his/her data was damaged by a virus.  

However, the Mac's built-in malware software looks for very little adware, which is a recent scourge.  Adware isn't malicious, it is just really annoying.  (It causes your Mac, or just your browser, to show you ads.)  So it's worth downloading and keeping this anti-adware program handy if you find your Macintosh showing you ads unexpectedly:

DetectX Swift (free, but that's expected to change)
https://sqwarq.com/detectx/

So, what about true anti-virus software? Well, you don't need it, but many folks really want it.  So here is an excellent one, and it's free (it wouldn't hurt to download it and run it every rare now and then just to satisfy yourself that your Mac is clean):

VirusBarrier Free Edition (free)
https://itunes.apple.com/us/app/VirusBarrier-Scanner/id1200445649
This is a full version of Intego's excellent commercial anti-virus program VirusBarrier [usually $40/year] minus some [but not all] of the automated scanning features in the commercial version.  This isn't just a nice free product, in the past VirusBarrier has won all the believable third party anti-virus comparison tests.

WARNING: Other free anti-virus programs for the Macintosh have been implicated with causing very nasty slowdowns.  In most cases, other than the above, I would very strongly recommend avoiding any free (and even most commercial) anti-virus software for the Macintosh.

Return to Table Of Contents


Note #1) More On Defragmenting Your Hard Drive

As I indicated above, there are those who will tell you that you *never* need to defragment your hard drive, and to some extent they are correct. Certainly the average user, with a hard drive that isn't anywhere close to being full, and using applications that don't require every last bit of performance that can be mustered, won't notice any significant performance gain, or other benefit, from defragmenting their hard drive. (Though you may find defragmenting your hard drive to be important if you do disk-intensive work, such as video editing.)

Just about all of the experts agree that there is a Macintosh problem that manifests itself when your Macintosh gets somewhere around 80% full. However, not all of these experts seem to realize that the problem is due to a lack of free contiguous space on your hard drive. As a result, these folks usually advise that you deal with this whole problem by purchasing a new drive when your old drive gets to be about 80% full. That will work, but, personally, when I have a 200GB drive, with 40GB unused, I expect to be able to use that 40GB before I have to buy a new drive. 40GB is a huge amount of space and it seems silly to just give up on it. Frankly, it seems to me that advising that one always keep a ridiculously large amount of free space available on their drive, to assure reliable operation, isn't the best course.

"...keep at least 15% of your startup drive free at all times; more is better."
http://macs.about.com/od/faq1/f/How-Much-Free-Drive-Space-Do-I-Need.htm

Joe Kissell of Macworld magazine recommends defragmenting your hard drive as it starts becoming too full or when there is severe disk fragmentation.
Macworld, February 2008, page 102.

If a UNIX system employs non VM for memory management (that is, real memory) the issue of swapping is a different beast altogether. This is because when swapping memory out it has to be done in large contiguous chunks (not small pages of 4096 bytes). For this reason it's important that the swap file space on disk be a contiguous set of tracks/cylinders and if possible have a separate data path to avoid interfering with other user i/o activities.
http://hints.macworld.com/article.php?story=20010613140025184

Apple says that you generally don't need to defragment your hard drive if you are running Mac OS 10.2 or higher:
https://support.apple.com/en-us/HT1375
But then they say: If your disks are almost full, and you often modify or create large files (such as editing video...), there's a chance the disks could be fragmented. In this case, you might benefit from defragmentation, which can be performed with some third-party disk utilities.

Apple adheres to the "leave a ridiculously large amount of free space on your drive and then replace your drive when it prematurely begins to hit its head" concept. They admit that defragmenting your hard drive is a good idea, but they will only admit it for those who badly need to do it. (Folks who really give their drives a workout, and those who edit video.) For everyone else they feel that its just fine for them to purchase a new hard drive when they encounter a problem with a lack of free contiguous drive space. As Apple says, modern hard drives are big. Apple knows that for many users it will take a long time for them to fill their drive up to around 80% full, if ever. They aren't about to recommend maintenance that isn't necessary for everyone. In addition, Apple has always been reluctant to admit to users that they might not be able to get along without some third party utility. For instance, under OS 8 and OS 9 Disk Warrior was practically a necessity. But you never heard Apple admit this.

According to one of their technicians, MicroMat feels that under certain circumstances defragmenting your hard drive is very important, and may even be critical to preventing data loss, and based on my experience I concur:
http://is.gd/5VKgNv

Continuation of discussion on fragmentation by MicroMat tech:
http://is.gd/olc6k8

MacFixIt has an article on defragmenting your hard drive, including a test of iDefrag:
https://is.gd/HZoqFr
“...in our informal testing, we noticed significantly snappier operation of Spotlight and quicker response from Mail.app after performing only the least invasive of iDefrag's optimization routines...
“The bottom line is that users with large files will benefit most greatly from defragmentation routines in Mac OS X. However, use of the disk optimization routines offered by tools like iDefrag can also serve as a boon to casual users of Mac OS X looking for a speed boost.”

ShirtPocket Software, makers of SuperDuper have a short "white paper" about the need to defragment your hard drive:
http://s3.amazonaws.com/com.shirtpocket/SuperDuper/Fragmentation.pdf


Other Defragmentation Utilities...and Disk Warrior:

Some manufacturers use the terms "defragmentation" and "optimization" interchangeably. For instance, as far as I can tell, MicroMat does this even though TechTool Pro doesn't really do any optimization when defragmenting your hard drive.
http://www.micromat.com/

Prosoft's Drive Genius
http://www.prosofteng.com/products/drive_genius_info.php
does both file and disk defragmentation, but as far as I can tell, no optimization. However, their advertising seems to use the terms "defragmentation" and "optimization" interchangeably.

Intech Speed Tool's documentation:
http://www.speedtools.com/Users Guides/Disk Defrag Guide.pdf
says that the product defragments your drive, but it does not optimize it. So it would appear that Intech's product is not an optimal choice.

NOTE: Alsoft sometimes refers to what Disk Warrior, their popular hard drive repair utility, does as "optimization" and/or "defragmentation." However, they are referring to the drive's directory, not to defragmentation and optimization of the drive’s files (data) and free space on the drive. Many folks get confused by the terminology used and think that Disk Warrior is a hard drive defragmentation utility, and it is not. Your Macintosh maintains a "directory" which is an invisible structure that is a catalog of all of your Mac's files and system parts. (It is actually more complex than this simple explanation.) If the directory becomes corrupted your Mac can lose track of what is on your hard drive. (e.g. Your files disappear.)
For a more detailed and technical explanation, see:
http://alsoft.com/DiskWarrior/details.html
Disk Warrior fixes your Mac's directory by rebuilding a new optimal one from scratch. Other utilities attempt to fix the directory by patching the directory structure rather than by rebuilding it. Disk Warrior also optimizes the structure of the directory for maximum overall disk performance.

Return to Table Of Contents


Note #2) Routine Maintenance Or Troubleshooting Technique

A couple of well-known Macintosh authors have been quoted as saying that many of the procedures listed on this Web page are not what they consider to be routine maintenance, but rather they are best reserved to be used as troubleshooting techniques when your Macintosh shows signs of decreased performance or starts acting in an unusual manner.  They say that you can go a long time without having to perform any of the procedures that I list here.

I can’t say that they are wrong.  However, I compare it to checking and adjusting the air in the tires of your car.  Do you do that regularly, or do you wait until your tires start to show signs of unusual wear and/or your car starts to handle poorly?  Many people do the latter, and I can’t say that they are wrong in doing so.

What if it took less than ten minutes to check and adjust the air in your car’s tires, and you didn’t have to get your hands dirty, or leave the comfort of your home to do so?  Would you then be more likely to check the air in your tires regularly, especially considering the benefits of better handling, longer tire life, etc.?  It seems to me that it would be well worth your while to do so.

That is where my feelings are as far as the procedures on this Web page.  You can do them all quickly, easily, and at no monetary cost, and there is no downside to doing them.  But the upside to doing routine maintenance is that your Macintosh will always be running at its best (not just when you have noticed that things are really out of wack, and you decide that its time to troubleshoot and repair them), and you may even avoid some nasty problems down the road. You can decide for yourself if the extremely modest investment of time and effort is worthwhile to you.

Return to Table Of Contents



SOFTWARE MENTIONED ON THIS SITE, AND WHERE TO GET IT

Free utilities

iDEFRAG
https://coriolis-systems.com

(I'm aware that Coriolis Systems is now defunct and that iDefrag, though still downloadable for free, is unsupported.  I'm afraid that there is still nothing that compares to iDefrag, and there is nothing else that I would recommend.)

OS-X-SAT-SMART-Driver
https://github.com/kasbert/OS-X-SAT-SMART-Driver
https://github.com/RJVB/OS-X-SAT-SMART-Driver/blob/RJVB/SATSMARTDriver-0.50.dmg

DETECTX SWIFT
https://sqwarq.com/detectx/

VIRUSBARRIER FREE EDITION
https://itunes.apple.com/us/app/VirusBarrier-Scanner/id1200445649

Free multi-function utilities:

Note: Ordinary users might find some of the options included in typical multi-function utilities confusing and/or intimidating. Even worse, they might find some of them to be dangerous!  A multi-function utility will often save you time when doing routine maintenance, and it may even include functions that are hard to find in other free utilities. Please be careful when using the following utility.  There are times where MAINTENANCE is the best free utility for the job.  In those cases I've tried to tell you on this Web page how to do that job, and only that job.
(Note: There is no need to write and tell me about the dozen or so other multi-function utilities for OS X that are available. I've left out mention of them on purpose.  This one is free, and it does what you need to do.)

MAINTENANCE (free)
https://titanium-software.fr/en/maintenance.html
Maintenance runs the cron jobs, clears caches, repairs permissions, and more. 

Commercial software:

DRIVEDX
http://binaryfruit.com/drivedx

DISK WARRIOR (Useful if you have hard drive problems that Disk Utility/Repair Disk can’t repair.)
http://www.alsoft.com/DiskWarrior/
DiskWarrior does not support drives formatted as APFS rather than HFS+
(e.g. internal hard drives under Mojave and Catalina are non-optionally formatted as APFS).

SUPERDUPER
http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html

VOLITANS SMART UTILITY
https://www.volitans-software.com/apps/smart-utility/

Return to Table Of Contents



If you have any additions to this Web site to suggest
I would very much appreciate hearing your suggestions.
Send them to:
Randy B. Singer
randy@macattorney.com


Other Web Sites By Randy B. Singer:

• Macintosh Slowdown Solutions
http://www.macattorney.com/sd.html

• Macintosh Beachballs!
http://www.macattorney.com/rbb.html

• Upgrading To The Latest Macintosh OS
http://www.macattorney.com/upos.html

• Free Or Inexpensive Macintosh Software
http://www.macattorney.com/free.html

• Macintosh Accounting Software
http://www.macattorney.com/accounting.html

• Macintosh Email Software
http://www.macattorney.com/mail.html

• Macintosh Word Processing Software
http://www.macattorney.com/wp.html

• Law Office Software for the Macintosh
http://www.macattorney.com


About The Author Of This Web Site

Randy B. Singer is:

- The head of the MacAttorney User Group
http://www.macattorney.com
with, at this writing, close to 10,000 members!

- A co-author of The Macintosh Bible (4th, 5th and 6th editions);

- Author of the ABA publication:
The Macintosh Software Guide for the Law Office

If you are a Macintosh-using attorney or legal professional (including law students)
for a FREE e-mail subscription to
The MacAttorney Newsletter
send an e-mail to: randy@macattorney.com
with the word "subscribe" in the Subject line of the message.


BableFish

TigerJaguar

 Panther