MAGICtricks
return

OPERATING SYSTEM MAINTENANCE

In order to keep your operating system running smoothly, the following steps should be performed at the intervals suggested. These steps will go a long way to preventing unpredictable behavior. This page was originally based on an article in MacAddict's Official Mac Handbook - Winter 2003 and has been updated several times since. The illustrations are taken from OS-X 10.5.8 unless stated otherwise.

CONTENTS


File System Checks (Frequency: every month)

Use a unix tool that comes with the OS-X system to clean up your disk. Do the following:

  1. Reboot your mac while holding down Command-S until you see text and unix mumbo-jumbo.
  2. At the command prompt type:
    /sbin/fsck -y followed by a return for OS-X 10.1 or 10.2
    /sbin/fsck -fy followed by a return for OS-X 10.3 (Panther) or higher
    exactly as written. This will cause a series of test to be run, report any errors, and fix the errors. If it does find errors then you should run it again, and keep repeating the process until there are no errors reported.
  3. Type reboot followed by a return to bring up the familiar finder.
An easier way to do this is to start up in "Safe Boot Mode" by holding down the Shift key while booting up the Mac until a black spinning bar appears. Then be patient while the system checks itself out and makes repairs automatically. After it is through you should reboot the Mac because in safe mode not all the systems are running.

An alternative is to buy a copy of Drive Genius (my favorite) at www.prosofteng.com, DiskWarrior at (www.alsoft.com), or TechTool pro at (www.micromat.com) and use it to check out your hard drive. Note that Drive Genius also offers drive de-fragmentation.

Onyx takes care of this check when you run it.


S.M.A.R.T. check (Frequency: every boot up)

Most modern hard disks have a system (S.M.A.R.T.) in which they can be checked for errors and provide a warning before the disk fails. SMARTReporter is a free application that sits in the menubar and is green while the disk is OK but when it turns red you are going to have disk problems and need to fix it (you DID back up, right?) SMARTReporter can (and should) be set to startup on login. The S.M.A.R.T. status of your disk can also be checked using Onyx (see below).


Clean Out the Caches (Frequency: every month - also before any system updates)

Mac OS-X stores a lot of data in Caches in order to optimize performance. However, sometimes the data in these cashes does not get updated properly, causing problems like random system crashes, or the inability to change certain settings (like setting the default browser). Here is the procedure:

  1. Make sure no programs are running and then Delete everything in Library>Caches. If some of these will not let you delete them because you do not have permission then you may have to use the unix terminal and use the "sudo" way - if this is gibberish to you then forget it and use Xupport, Onyx, or Cocktail (see below)
  2. Delete everything in Users>username>Library>Cashes
  3. Reboot

Onyx can also perform this task for you (see below)


Repair Permissions (Frequency: every quarter - also before and after any system updates and SuperDuper! Backups)

Mac OS-X can get confused as to which files you should be able to read and write. This can cause problems such the inability to edit certain files (the OS complains that they belong to root). Fortunately the Mac provides a simple way of fixing this as follows:

  1. Run Disk utility - You can find this application in: Applications -> Utilities
  2. Highlight your startup partition and click on the "First Aid" tab.
    permission
  3. Click on the "Verify Disk Permissions" button.
  4. If any problems are reported then click on the "Repair Disk Permissions" button.
Permissions can also be repaired at the click of a button in Xupport, Onyx, or Cocktail (see below)


Run Prescheduled Tasks (Frequency: every week)

Mac OS-X's unix core (from 10.0 to 10.4.2) contains basic maintenance tasks that automatically clean up old log and cache files. However they are scheduled to run in the middle of the night - so if your Mac is shut down at night they will not run. To fix this you have four alternatives:

  1. Leave your Mac on every night (but not asleep)
  2. Start the Terminal (it is in the Utilities folder which is in the Applications folder) and then type these three commands and follow each with a Return
    sudo periodic daily - be prepared to provide your password
    sudo periodic weekly
    sudo periodic monthly
    each will take a while to run and then give you the prompt character when it is finished. Reboot you Mac when these are finished.
  3. If you are daunted by the terminal and unix then obtain a Freeware application called MacJanitor and use it
  4. Use Xupport, Onyx, or Cocktail (see below)

NOTE: this maintenance is run automatically in OS 10.4.3 and higher and you no longer need to worry about it.


Run Onyx, Xupport, or Cocktail (Frequency: every month)

These versatile shareware products are general purpose utilities for Mac OS-X 10.2 or later. They can all be found on the software page of this site. They will clean your cashes, repair your permissions, run scheduled system maintenance, delete locked or inaccessible files, clear out old logs, and more. All these things can be done from the unix command line, but these applications allow you do do them from a Mac friendly interface. The help files explains everything!

Onyx
Onyx (above) freeware can be obtained from www.titanium.free.fr/ Make sure that you get the correct version for your current operating system (to find out your operating system, click on the Apple menu and select "About this Mac").
Use the Automation page as shown with the items clicked as shown every month after the application has gone through the S.M.A.R.T. status check and the disk check.


Xupport
Xupport (above) shareware can be obtained from www.computer-support.ch


cocktail
Cocktail (above) shareware can be obtained from http://www.maintain.se/cocktail/



Run Software Update (Frequency: at least every month)

OS-X has a feature that allows you to update the Operating System and related software. Keeping up to date with the latest releases from Apple will help circumvent known problems.

Just go to the Apple menu and click on "About This Mac" and then click on the "Software Update..." button. It will allow you to update on a regular interval or do it manually Now. Usually you will want to take whatever it offers but can skip the ones that do not apply (for example the iPod updates if you do not have an iPod).

system update

Back Up (Frequency: every week - daily if you are a heavy or business user)

If you are not doing this then you will go straight to hell - Start doing it now unless you do not mind losing everything!

For more about backing up your hard drive see the Back Up page on this site


Check for Viruses (Frequency: every month?)

There is not too much to worry about in the Mac world but once in a while we need to run some protection for the occasional problems. We are still susceptible to the Microsoft Word viruses that have infiltrated the Windoze world. A new virus is concealing itself as a MP3 file and can cause damage (be careful of downloaded MP3 files).

If you have a .Mac account then you can download Virex for free. A more robust and effective application is Symantec's Norton AntiVirus ($69.95, www.symantec.com) - Make sure that you have a version appropriate to your operating system (for example you need version 10 for Tiger) and keep it up to date.

Whenever you hear of a new virus on Macs (keep up with MAGIC meetings, MAGIC newsletter, and Mac magazines and websites) you need to update the antivirus list for AntiVirus (or whatever application you are using) and then run the program again - just in case.

Note: No viruses have been found on OS-X to date - however, better safe than sorry!


Zap your PRAM (Frequency: every 3 months or when you are experiencing crashes)

The PRAM (Parameter RAM) is a special bit of memory on all Macintoshes. It keeps lots of useful preference information for your operating system such as Date and Time startup disk, sound volume, screen resolution, etc. Occasionally it can become corrupted and your computer may behave strangely.

Resetting the PRAM is quite easy. Just restart your computer while holding down the Command-Option-P-R keys until your computer restarts (chimes) the second or third time - then release the keys. Once the computer is back up and running you may need to reset some of the aforementioned preferences and settings.


Optimize (de-fragment) your Hard Drive(s) (Frequency: every 6 months)

Depending on how you use your Mac, you may find that files get fragmented often. That means that files may not have their information stored contiguously or together - one piece of information may be in one location of your drive and another is somewhere completely different. This sort of fragmentation can cause programs and data files to load more slowly and it can also cause the OS performance to degrade. More seriously, the empty space becomes fragmented and the operating system can no longer find large chunks of contiguous space - this hampers its ability to use virtual memory and slows down file input and output.

The problem can be fixed by de-fragmenting your hard drive. A good tool for the job Drive Genius, a popular disk utility ($99, http://www.prosofteng.com). It takes a while to de-fragment (you might want to do it overnight) but it does a good job and leads you by the hand.

Update (Aug 2006):

A new application called iDefrag can analyze your hard drive to see whether you need to de-fragment or note (this part is free so try it out), and can also perform a de-fragment of the disk if required (for a fee of $30). It can be found at http://www.coriolis-systems.com/iDefrag.php iDefrag

Note that the lower portion of the main screen shows a representation of the whole disk - in this case there is no large contiguous area that is all empty (white) - indicating that this disk needs to be de-fragmented (preferably after deleting some of the files - we recommend that the hard drive should not get more than three quarters full). OS-X requires there to be a large contiguous empty space so that it can perform virtual memory management efficiently. It is less important for the files to be contiguous because the operating system tends to take care of this problem during idle times. Note that in this example the disk is too full as well.

NOTE: This procedure is only required for computers with hard drives. Newer computers with SSD memory (flash solid state memory) should not de-frag their disks as it is not necessary and not useful.


Create a New User (Frequency: once)

Sometimes your user preference files can become corrupted and prevent you from logging in to fix the problem. Having a backup Admin user allows you to log in in as an alternate user and solve these types of problems - fortunately they are very rare but why not be prepared?

To add a second user go to the System Preferences and click on the Accounts icon. In Jaguar Click on New User and then be sure to select Allow User to Administer this Computer (see Picture below). In Panther and Tiger click the + (add) button and under limitations set No Limits, or check the "Allow user to administer this computer" box.

New User

Check your Preference files (Frequency: whenever an application is misbehaving)

Preference files can become corrupted (especially in Jaguar or earlier) causing applications to quit or to misbehave. A free utility called Preferential Treatment can help you find and remove corrupted preferences. Of course keeping backups of your preference files is a great idea and will allow you to replace a corrupted file, but if you do not have a backup then just delete the bad one and the application will simply make a new one with the default preferences.

Preferential Treatment

Check your System Preferences (Frequency: once)

A good way to keep your system running smoothly is to understand it as much as possible and to know what your options are when using it. While there are many levels of expertise that you could attain, one of the simplest things you could do is to go through every tab of every pane of your System Preferences. Even if you just window shop and do not change anything, you'll be left with the knowledge of what options are available and they may help you to solve some weird problem that you encounter in the future.

System Preferences

Upgrade your Mac (Frequency: every 3 to 4 years - or as often as your spouse will allow)

No amount of maintenance can get around the fact that your computer will eventually suffer from obsolescence. Software vendors tend to write for the fastest machines available or for machines that do not yet exist. When you notice that your machine just does not like running the latest software or cannot handle a peripheral that you would like or need - the time has come.

Anyone buying a Mac today can rest comfortably knowing that it will hold its own with software coming out for the next couple of years. Past that you may begin to notice slowdowns but they will be acceptable at first. Games are the most notorious for needing more powerful machines. Remember that if you are content to use the same software (maybe you love Word v5.0) then there is no need to upgrade at all.


return

Copyright:

Made on a Mac

©Macintosh Appreciation Group of Island County (MAGIC) 2004 - 2009
last updated: 13 December 2014