Chapter 9
In This Chapter
Deleting applications
Using Apple System Information
Using Activity Monitor and Disk Utility
Updating OS X and your drivers
Backing up your system with Time Machine
Using a disk defragmenter and start-up keys
The title of this chapter really sounds like a contradiction in terms, doesn’t it? The concepts of joy and maintenance are likely mutually exclusive to you — and it’s true that most OS X owners would rather work or play than spend time under the hood, getting all grimy. I understand completely; maintenance is far less sexy than a game like Civilization V or even an exciting productivity application like Pages.
However, if you do want to work or play uninterrupted by lockups and crashes — yes, believe it or not, the Big X can indeed take a dive if it’s not cared for — and you’d like your Mac to perform like an Olympic athlete, you have to get your hands dirty. That means taking care of regular maintenance on your hardware, OS X, and your all-important applications, documents, and folders.
Like most techno-types, I enjoy pushing my system to the limit and keeping it running in top form. And who knows — after you become a Yosemite power user, you could find yourself bitten by the maintenance bug as well. In this chapter, I cover how to take care of necessary tune-up chores, step by step.
Nothing lasts forever, and that includes your applications. You might no longer need an application, or maybe you need to remove it to upgrade to a new version or to reinstall it. In contrast to Windows XP and Vista (which have the Add or Remove Programs utility in Control Panel) or Windows 7 and 8 (which have the Programs and Features utility), OS X doesn’t have a stand-alone utility for uninstalling software — nor does it need one, because virtually all Macintosh applications are self-contained in a single folder or series of nested folders. (And not by accident … keeping everything related to an application in a single folder has always been a rule for Apple software developers since the first days of the Macintosh.) Therefore, removing an application is usually as easy as deleting the contents of the application folder from your hard drive (for example, removing the Quicken folder to uninstall Quicken). If an application does indeed sport an uninstall utility, that utility almost always appears in the same folder as well.
Always check the application’s README file and documentation for any special instructions before you delete any application’s folder! Some applications (like those from Adobe) may require extra steps to deactivate the software license for later use before you can delete the application. If you create any documents in that folder that you want to keep, don’t forget to move them before you trash the folder and its contents. Some applications may come complete with their own uninstall utility, so checking the README and documentation may save you unnecessary steps.
Some applications can leave secondary files in other spots on your disk besides their home folder. When you’re uninstalling a program that has support files in other areas, use Spotlight in the Finder menu bar to locate other files that might have been installed with the application. (I cover Spotlight in Chapter 4 of this minibook.) And make sure to check whether an application has an uninstall utility, or an uninstall option available through the original setup application.
For example, Figure 9-1 illustrates a Spotlight search that I ran on my Diablo 3 software. By searching for the words Diablo 3, I found a number of files created in other folders, such as log files, Mail messages, and the language files that appear in a separate folder. Typically, you want to delete the main application folder and then remove these orphans.
The day will likely come when you need hard information about your hardware. You might need to determine precisely what hardware is installed in your Mac for the following reasons:
Apple provides OS X with an all-in-one hardware and software display tool — System Information — which resides in the Utilities folder in your Applications folder. You can reach the System Information utility also via the Apple menu (). Just click About This Mac, and then click System Report. System Information is also available from the Utilities (sometimes called Other) folder in Launchpad.
As with the folders in a Finder window in List view mode, you can expand or collapse each major heading that appears in an Information screen. Just click the triangle that appears to the left of each Contents heading to expand or collapse that heading.
The System Information major headings include the following:
Our next stop in Maintenance City is a useful little application dubbed Activity Monitor, which is specially designed to show you just how hard your CPU, hard drives, network equipment, and memory modules are working behind the scenes. (Activity Monitor is especially helpful in determining if your Mac is running low on system memory.) To run Activity Monitor, open the Utilities (or Other) folder in Launchpad and click the Activity Monitor icon.
To display each type of usage (CPU, system memory, and so on), click the buttons on the window toolbar; the lower pane changes to reflect the desired type (see Figure 9-3). For example, if you click Memory, you see the amount of unused memory; click CPU or Network to display real-time usage of your Mac’s CPU and network connections.
You can also display a separate window with your CPU usage; choose Window⇒CPU Usage or press +2. And just to make things fun, three types of central processing unit (CPU, which is commonly called the “brain” of your Macintosh) displays are available from Activity Monitor:
Why do you have multiple bars in your CPU usage monitor? That’s because you’re running one of Apple’s multiple-core Intel processors. More than one engine is under the hood!
If you’re using the CPU Usage or History window, you can drag it anywhere that you like on your OS X Desktop. Use the real-time feedback to determine how well your system CPU is performing when you’re running applications or performing tasks in OS X. If this meter stays peaked for long periods of time while you’re using a range of applications, your processor(s) are running at full capacity.
Note, however, that seeing your CPU capacity at its max doesn’t necessarily mean that you need a faster CPU or a new computer. For example, when I’m running memory-ravenous applications, such as Photoshop or Word, the Activity Monitor on my Mac mini is often pegged (indicating maximum use) for several seconds at a time. The rest of the time, it barely moves. Whether a computer is fast enough for you and the applications that you run is a subjective call.
Another important application in your maintenance toolbox is Disk Utility, which you find (no surprise here) in the Utilities folder in your Applications folder. When you first run this program, it looks something like Figure 9-4, displaying all the physical disks and volumes on your system.
The Disk Utility application has its own toolbar that you can toggle on and off. Choose Window⇒Hide/Show Toolbar to display or hide the toolbar, or Window⇒Customize Toolbar to select which icons inhabit the Disk Utility toolbar.
The volume tree structure on the left of the Disk Utility window lists both the physical disks and the partitions that you’ve set up. A partition is nothing more than another word for volume, which is the formatted section of a disk that contains data. A single physical hard drive can contain several partitions. The information display at the bottom of the Disk Utility window contains data about both the volumes and the partitions on your hard drive(s).
To illustrate: On my system, clicking the physical internal hard drive at the top of the tree (the first drive entry labeled 1TB) displays a description of the drive itself at the bottom of the window, including its total capacity, connection bus (the interface it uses), and whether the drive is internal or external (connection type). See Figure 9-5.
However, clicking the tree entry for Wolfgang (one of the partitions that I created when I formatted the drive) displays information about the type of formatting, the total capacity of the partition and how much of that is used, and the number of files and folders stored on the partition (as shown at the bottom of Figure 9-6).
From the First Aid pane, you can use Disk Utility to verify (or check) any disk (well, almost any disk) for errors, as well as repair any errors that it finds. Here are the two exceptions when the buttons are disabled:
If you have multiple operating systems on multiple disks, you can boot from another OS X installation on another drive to check your current start-up disk. Or you can boot your system from the Recovery HD partition and run Disk Utility from the menu.
You usually can’t repair a disk that has open files that are currently being used. If you’re running an application from a drive or you’ve opened a document that’s stored on that drive, you probably can’t repair that drive.
You can also elect to verify and repair the permissions (or privileges) on a disk (both permissions created by the Apple Installer and those created by the App Store); these are the read/write permissions that I discuss in detail in Book II, Chapter 6. If you can’t save or move a file that you should be able to access, I recommend checking that drive for permissions problems. Although you can’t fix disk errors on a boot drive, you can verify and repair permissions on any volume that contains an OS X installation (whether it was used to boot your Mac or not).
To verify or repair, you must be logged in as an admin-level user.
To verify or repair a drive, first select the target volume/partition in the list at the left. To check the contents of the drive and display any errors, click the Verify Disk button. Or, to verify the contents of the drive and fix any problems, click the Repair Disk button. (I usually just click Repair Disk because an error-free disk needs no repairs.) Disk Utility displays any status or error messages in the scrolling list; if you have eagle eyes, you’ll note that the window can be resized so that you can expand it to display more messages. (You can also drag the dot between the left and right panes to expand the list.)
I generally check my disks once every two or three days. If your Mac is caught by a power failure or OS X locks up, however, immediately check the disks after you restart your Mac.
A number of very good commercial disk repair utilities are on the market. My favorite is Drive Genius 3 from Prosoft Engineering ($99; www.prosofteng.com). Disk Utility does a good job on its own, though, and it’s free.
“Danger, Will Robinson! Danger!” That’s right, Robot, it is indeed very easy to seriously screw up and get “Lost in Erase.” (Man, I can’t believe I typed such a bad pun. I have no shame.) Anyway, it’s time for another of Mark’s Maxims. To paraphrase the rules for handling a firearm responsibly:
Never — and I do mean never — click the Erase tab unless you mean to use it.
Figure 9-7 illustrates the Erase controls in Disk Utility. You need to erase a disk or volume only when you want to completely wipe the contents of that existing disk or volume. You can also erase a rewritable CD (CD-RW) or DVD (DVD-RW, DVD+RW, or DVD-RAM) from this pane.
To erase, follow these steps:
Always choose Mac OS Extended (Journaled) entry from the Format list unless you have a specific reason to use the MS-DOS File System (for compatibility with PCs running Windows) or the ExFAT File System (for compatibility with high-capacity USB flash drives). In some cases, Disk Utility forces you to choose the Mac OS Extended entry instead, but the result is the same. Note that you do not need to format a disk or volume with the MS-DOS File System just to read a file from a PC system — OS X recognizes MS-DOS removable media (such as a USB drive formatted under Windows) without a problem. You can also choose to encrypt a volume when formatting it — not a necessity (in most cases) for a personal Mac, but often a requirement in business and government offices.
If you’re erasing an existing volume, the default is the existing name.
By default, this is set to Fastest, so Disk Utility doesn’t overwrite any data while formatting; instead, it simply trashes the existing directory, rendering that data unreachable. Or is it? With some third-party disk utilities, an unscrupulous bum could recover your files after a simple Fast format, so you can specify alternative, more secure methods of erasing a disk or volume. Unfortunately, these more secure erasure methods can take a horrendous amount of time.
So, using the Fast option is okay unless you want to make sure that nothing can be recovered, or use the Zero Out Data to take a more secure route with the least amount of extra waiting. For example, you’d want to use the next-slowest option (which writes a single pass of all zeros over the entire disk) if you’re selling your Mac on eBay and you’re formatting the drive for the new owner. If you’re really set on the tightest, government-quality security, select Most Secure … but make sure you have plenty of time to spare!
You can even click Erase Free Space to wipe the supposedly “clean” areas of your drive before you format. Man, talk about airtight security!
In the sheet that appears, click Erase to confirm that you do want to do the deleterious deed.
From time to time, just about everyone wishes he had additional volumes handy for organizing files and folders, or at least a little extra space on a particular partition. If you find yourself needing another volume on a disk — or if you need to resize the total space on existing volumes on a disk — select a physical disk and click the Partition tab in Disk Utility to display the controls that you see in Figure 9-8. (Make sure that you select a disk and not a volume.) From here, you can choose a volume scheme, creating anywhere from 1 to 16 volumes on a single disk.
You can’t monkey around with the partitions on a start-up disk because OS X is currently running on that disk. (Think about removing your own appendix, and you get the idea.) Disk Utility prompts you for permission first, but always back up a partition before you resize it!
To set up the partitions on a disk, follow these steps:
To add a partition to an existing layout, click the Add button (plus sign).
I have three partitions set for this disk, as you can see in Figure 9-8.
Always use Mac OS Extended or Mac OS Extended (Journaled) from the Format menu unless you have a specific reason to use the MS-DOS file system (for compatibility with PCs running Windows) or the ExFAT file system (for compatibility with high-capacity USB flash drives).
Some folks — like us author types — create multiple volumes so they can boot from multiple versions of OS X.
If you suddenly decide against a partition change, click the Revert button to return to the original existing partition scheme.
The Revert button is available only before you click the Apply button.
If you have more than one partition, check out the handles separating the volumes in the partition list — they appear as dashed lines in the lower-right corner of the partition. You can click and drag these handles to dynamically resize the volumes. This step makes it easy to adjust the individual volume sizes for the disk until you get precisely the arrangement you want.
The next stop on the Disk Utility hayride isn’t for everyone — as a matter of fact, only an OS X power user with a roomful of hardware is likely to use it. RAID (Redundant Array of Independent/Inexpensive Disks) is what it says. In normal human English, a RAID set is a group of multiple separate disks, working together as a team. RAID can do these tasks:
You need at least two additional hard drives on your system besides the start-up disk, which I don’t recommend that you use in a RAID set.
To set up a RAID array in OS X, follow these steps:
Always use Mac OS Extended or Mac OS Extended (Journaled) from the Format list unless you have a specific reason to use the MS-DOS File System (for compatibility with PCs running Windows). Journaling helps reduce the amount of disk fragmentation and also helps speed up your hard drive’s performance.
As any good software developer should, Apple constantly releases improvements to OS X in the form of software updates. These updates can include all sorts of fun stuff, including these things:
Apple makes it easy to keep OS X up to date with the Software Update controls in System Preferences.
You don’t even have to display the System Preferences window to check for new software updates manually. Click the Apple menu () on the menu bar, and choose Software Update to perform a manual check immediately.
To check for new updates periodically, display the App Store pane in System Preferences. Select the Automatically Check for Updates check box, and choose whether you want to automatically download updates. For a manual check, make sure that your Mac is connected to the Internet and click the Check Now button.
Yosemite also displays a Notification window alerting you to new updates. You can choose to continue with the update from the Notification window, or wait and update manually later.
To download updates automatically, select the Download Newly Available Updates in the Background check box. (Note that you can also choose whether to install both new app updates and install system data and security updates. I suggest that you enable both these check boxes.) The Big X politely downloads the updates behind the scenes and then alerts you that they’re ready to be installed. With automatic downloading disabled, OS X launches the Updates pane of the App Store and displays any available updates with short descriptions, and you can manually click the Update button next to a specific update.
If you own multiple Macs, you can even choose to automatically download those apps that you’ve purchased on your other Apple computers — remember, after you buy most apps from the App Store (or if you’ve turned on Family Sharing), those apps can be shared among all Macs that use the same Apple ID! The App Store pane displays the Apple ID you’re using on this Mac.
I recommend installing all updates, even for hardware that you don’t have yet. For example, I always install AirPort updates even though I don’t have AirPort hardware in my Mac Pro. The reason? Often, the functionality covered by an update may include system software that you do use, so you still benefit from installing it.
You might have to reboot after everything has been installed, so shut down any open apps.
I know we’re friends, but there’s no excuse for not backing up your data. The more valuable and irreplaceable your documents are, the more heinous it is to risk losing them. (I don’t get to use the word heinous in many of my books, but it fits really well here.)
Although Apple does include the capability to create disk images and restore them in Disk Utility (see the “So what’s a disk image?” sidebar, earlier in this chapter), I don’t recommend that you use disk images as your comprehensive backup solution. Why? The restore process can be confusing, and the disk image method doesn’t offer the level of control that you need when it comes to backing up individual files and folders (or selectively backing up by date or recent use).
If you do create backup datasets using disk images, you can restore them from the Restore tab in Disk Utility. You can also restore from a volume — typically, a volume you want to restore would be saved on a DVD or an external hard drive.
“Okay, Mark, what do I use to back up my valuable data?” Well, good citizen, only a bona fide backup application gives you such flexibility and convenience … and that’s why Yosemite power users turn to Time Machine, a feature that makes restoring files as easy as pointing and clicking!
If you enable backups through the Time Machine feature, you can literally move backward through the contents of your Mac’s hard drive, selecting and restoring all sorts of data. Files and folders are ridiculously easy to restore — and I mean easier than any restore you’ve ever performed, no matter what the operating system or backup program. Time Machine can even handle things such as deleted Contacts entries and photos you’ve sent to the Trash from iPhoto! To be blunt, Time Machine should be an important and integral part of every Mac owner’s existence.
You must have an external hard drive to use Time Machine — and if you travel often and you want to maintain a timely backup, you’ll have to take that external drive with you on the road, so it can stay connected whenever possible. Luckily, you can find countless portable hard drives on the market these days that take up less space than a paperback book. My Time Machine backup drive for my MacBook Air is the superfast 256GB Neutrino Thunderbolt Edition external drive from Akitio (www.akitio.com), which offers Thunderbolt connection speeds and the performance of a solid-state drive (or SSD). The Neutrino is light, rugged, and compact — and because the drive operates using power from the Thunderbolt port, you don’t need to pack yet another separate AC power cable!
Before you can use Time Machine, it must be enabled in the Time Machine pane in System Preferences. I cover these settings in detail in Book II, Chapter 3. I also recommend that you invest in an external USB 3.0, Thunderbolt, or FireWire hard drive to hold your Time Machine backups.
Here’s how you can turn back time, step by step, to restore a file that you deleted or replaced in a folder:
You can also click the Launchpad icon on the Dock and then click the Time Machine icon.
The Time Machine background appears behind your folder, complete with its own set of buttons below and to the right of the folder thumbnail (as shown in Figure 9-9). On the far right, you see a timeline that corresponds to the different days and months included in the backups that Yosemite has made.
Alternatively, use the Forward and Back arrows at the right side of the folder thumbnail to move through the folder’s contents through time. (You should see the faces of Windows users when you “riffle” through your folders to locate something you deleted several weeks ago!)
The backup date of the items you’re viewing appears at the right of the folder thumbnail.
If you want to restore all the contents of the folder, click the Restore All button instead.
Time Machine returns you to Finder, with the newly restored file now appearing in the folder. OUTstanding!
To restore specific data from your Contacts or images from iPhoto, launch the desired application first and then launch Time Machine. Instead of riffling through a Finder window, you can move through time in the application window.
For simple backup and restore protection, Time Machine is all that a typical Mac owner at home is likely to ever need. Therefore, a very easy Mark’s Maxim to predict:
Connect an external hard drive (or add an AirPort Time Capsule device to your system), and turn on Time Machine. Do it now. Don’t make a heinous mistake.
How about that? I got to use heinous twice in one chapter.
Time Machine is indeed awesome, but some Mac owners prefer a more traditional automated backup and restore process — one that doesn’t involve running the Time Machine application and navigating through the files and folders on a drive. For example, a person backing up a Mac acting as a web server or iTunes media server would much rather restore the entire contents of a volume automatically, in bulk, or create a custom backup/restore schedule that safeguards only certain files and folders.
If you’re dead-set against Time Machine, for your salvation you can turn to a commercial backup application such as SuperDuper! (from www.shirt-pocket.com), which can create a fully bootable image backup (often called a clone) of your Mac’s hard drive.
If no other backup is available, you can always take a second to at least back up your most important documents by copying them to a rewriteable CD or a USB flash drive. With this poor man’s backup, even if you lose your entire hard drive, you can still restore what matters the most.
Defragmenting your hard drive can significantly improve its performance. Using a defragmenter scans for little chunks of a file that are spread out across the surface of your hard drive and then arranges them to form a contiguous file. After a file has been optimized in this way, it’s far easier and faster for OS X to read than reassembling a fragmented file.
However, Apple dropped the ball on this one and didn’t include a defragmenter with OS X. Luckily, many third-party disk utilities (such as the aforementioned Drive Genius 3 from Prosoft Engineering) also include a defragmenting feature. If you have a defragmenter, I recommend that you use it once a month.
Defragmenting is only for traditional magnetic hard drives. Never defragment an SSD (solid-state drive) or one of Apple’s hybrid Fusion drives! Defragmenting one of these devices can shorten its operational life.
OS X includes a number of special keys that you can use during the boot process. These keys come in handy when you need to force your operating system to do something that it normally wouldn’t, such as boot from a CD instead of the hard drive.
No chapter on maintenance would be complete without a reminder to keep your hardware drivers current. Drivers are simply programs that allow your Mac to control hardware devices, such as a USB printer that you’ve added to your Mac Pro. The OS X Software Update feature that I discuss earlier, in the section “Updating OS X,” provides most of the drivers you need for things such as printers, USB, Thunderbolt, and FireWire peripherals, and digital cameras, but it’s still important to check those manufacturer websites.
Like the software updates from Apple, updated drivers can fix bugs and even add new features to your existing hardware, which is my definition of getting something for nothing.