Chapter 22
IN THIS CHAPTER
Cleaning unnecessary stuff off your internal drive
Backing up your data
Fixing permissions errors
Automating tasks in Monterey
Updating macOS automatically
Nothing runs better than a well-oiled machine, and your iMac is no exception. (But please, don’t ever oil your iMac; that’s just a figure of speech.) In this chapter, I demonstrate how you can make good use of every byte of storage space provided by your internal drive.
With a little macOS maintenance, such as Time Machine (for backing up and restoring your data) and frequent scans of your internal drive for disk errors, you can ensure that your iMac is performing as efficiently as possible. Automator allows your iMac to perform tasks automatically that used to require your attention. In addition, configuring Software Update to run automatically can allow you to live life free and easy, watching your favorite reality TV and eating ice cream (or yogurt — your pick).
Criminy! Where does all this stuff come from? Suddenly, that spacious 1TB solid-state drive has 19GB left, and you start feeling pinched.
Before you consider buying a new internal or external drive (which you can read about in Chapter 21), take the smart step: Sweep your internal drive clean of unnecessary and space-hogging software.
Apple includes the Manage Storage feature within macOS to help identify and display (and optionally delete) those huge files that are taking up so much of your drive’s real estate. Right-click the Desktop icon for the hard drive you want to clean, and choose Manage Storage. After a pause (which may be considerable, depending on the capacity of the drive), you’ll see the window shown in Figure 22-1.
Note the categories in the list at the left side — from here, you can see the approximate amount of space taken up by notoriously spacious items like your documents and your Music media. Click a category to display the worst offenders, sorted by size. If you see an item that you no longer need (like that 2GB happy cat video you downloaded 2 years ago), move your cursor over that item and click the X button that appears to delete it. If only cleaning your house were this easy!
If you’re willing to dig into your data a little, you can eschew the Manage Storage feature and dive elbow-deep into your drive to hunt down every unnecessary file. All you really need is the willpower to announce, “I simply don’t need this particular item any longer.” (Sometimes, that’s tougher than it may seem.)
Consider all the stuff that you probably don’t really need:
How hard is it to clean this stuff off your drive? Easier than you might think!
Removing an application or file from your drive usually takes two simple steps:
Truly, no big whoop.
As I mention earlier in the chapter, if you use the Manage Storage feature you can elect to set your Trash to empty automatically.
Some applications install files in different locations across your internal drive. (Applications in this category include the Microsoft Office suite and Adobe Creative Cloud applications like Adobe Photoshop.) How can you clear out these orphan files after you delete the application folder?
The process is a little more involved than deleting a single folder, but it’s still no big whoop. Here’s the procedure:
Click the Search text box in a Finder window.
You can read more about Search and Finder windows in Chapter 7.
Type the name of the application in the Search text box and choose Name Matches from the pop-up menu.
Figure 22-2 shows a typical search. I wanted to remove orphan files associated with Adobe After Effects; I had already deleted the application itself. By searching for the word Adobe, I found a folder of After Effects startup scripts that are now no longer needed and could also be deleted. This trick displays files created in other folders that include your search word in their names, such as project files, PDF files, and the font files that appear in the system Fonts folder.
Decide which of these files belong to the to-be-deleted application.
Be sure that the files you choose to delete are part of the deleted application. If necessary, right-click the file and choose Get Info from the shortcut menu to display more information. In Figure 22-2, the Adobe Bridge folder is included in the search results, but it’s definitely not part of After Effects!
Many associated files either have the same icon as the parent application or are in the Preferences, Caches, or Application Support folder.
In the Search Results window, click the associated file(s) that you want to delete and just drag them to the Trash.
Don’t empty the Trash immediately after you delete these files. Wait a few hours or a day. That way, if you realize that you deleted a file that you truly need, you can easily restore it from the Trash.
If you’d rather use a commercial application to help you clean up your drive, several applications are available, but most are shareware applications that perform only one task. For a good all-around cleanup utility, I recommend CCleaner for Mac, from Piriform (https://www.ccleaner.com/ccleaner-mac
), as shown in Figure 22-3. This great utility can clean everything from Internet crud (browser cookies and your surfing history) to those macOS system caches that can grow so doggone huge. And you can easily fine-tune whatever CCleaner for Mac wants to remove. The utility can also uninstall many applications with a single click. Oh, and did I mention that it’s free? I really like free!
Do it.
I’m not going to lecture you about backing up your internal drive … well, perhaps just for a moment. Imagine what it feels like to lose everything: names, numbers, letters, reports, presentations, saved games, photographs, video, and music. Then ask yourself, “Self, isn’t all that irreplaceable stuff worth safeguarding?”
Time for a Mark’s Maxim:
Take my word for it; you will thank me some day!
You can back up your files either by saving them to external media or — as I strongly recommend — by using the awesome Time Machine feature included with Monterey. Read more about Time Machine in the “Putting Things Right with Time Machine” section, later in this chapter.
The simplest method of backing up files is simply to copy the files and folders to an external drive, USB flash drive, or a DVD. Nothing fancy — in fact, I call this procedure the “quick-and-dirty backup” — but it works.
If you have an external drive or USB flash drive on your iMac, you can easily drag backup files to it from your internal drive (I cover external drives in Chapter 21):
Open separate Finder windows for:
Because you’re using macOS, you can also open a Finder tab within a single Finder window to accomplish the same task — from the keyboard, press ⌘ +T.
You can burn backups of your most important files to a recordable DVD, if you have an external optical drive. Saving your data is more labor-intensive this way — especially compared to backing up to cloud-based storage — but the end result is a truly bulletproof backup that doesn’t rely on an Internet connection or external drive. Plus, the backup can be read in any DVD drive for decades to come.
To use the Finder’s Burn feature to create a backup DVD, follow these steps:
Load a blank disc into your iMac’s optical drive.
If you’re using the default settings in the CDs & DVDs pane in System Preferences, a dialog appears, asking you to choose an action.
From the Action pop-up menu, choose Open Finder and then click OK.
An icon named Untitled DVD appears on your Desktop. Double-click the icon to open a Finder window.
Drag the files and folders that you want to back up into the disc’s Finder window.
They can be organized any way you like. Don’t forget that the total amount of data shouldn’t exceed 4GB or so (on a standard recordable DVD) or 8GB (on a dual-layer recordable DVD). You can see how much free space remains on the disc at the bottom of the disc’s Finder window.
When you’re ready to record, click File and then choose Burn Disc from the Finder menu.
You can also click the Action button that appears at the top of the disc’s Finder window and choose Burn Disc from the pop-up menu.
If you’ve invested in Toast 19 Titanium from Roxio (www.roxio.com
) or another DVD recording application, you can create a new disc layout to burn your backup disc. (Think of a layout as a road map indicating which files and folders Toast should store on the backup.)
If you enable backups via the macOS Time Machine feature, you can literally move backward through the contents of your iMac’s internal drive, selecting and restoring all sorts of data (including the entire drive). 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 some deleted items, like Contacts cards! To sum it up, Time Machine should be an important and integral part of every Mac owner’s existence.
Here’s how you can turn back time, step by step, to restore a file that you deleted or replaced in a folder:
Click the Time Machine icon on the Finder menu bar (which bears a clock with a counterclockwise arrow) and then click Enter Time Machine.
The oh-so-ultra-cool Time Machine background appears behind your folder, complete with its own set of buttons at the bottom of the screen (as shown in Figure 22-4). On the right, you see a timeline (that series of stacked boxes) that corresponds to the different days and months included in the backups that macOS has made.
Click any segment within the timeline to jump directly to a date (displaying the folder’s contents on that date).
Alternatively, use the Forward and Back arrows at the right 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 in the button bar at the bottom of the screen.
Click the Restore button at the right side of the Time Machine button bar.
If you want to restore all the contents of the current folder, click the Restore All button instead.
Time Machine returns you to Finder, with the newly restored file now appearing in the folder. Outstanding!
For robust 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:
Shifty-eyed, sneaky, irritating little problems can bother both your internal and external drives: permissions errors. Incorrect disk and file permissions can:
And that’s not all: Problems with your drive’s catalog file can also result in corrupted data and files that won’t open.
To keep macOS Monterey running at its best, I recommend that you fix permissions and catalog errors at least once per week. Follow these steps:
Click the First Aid button and then click Run.
Disk Utility does the rest and then displays a message about whatever it has to fix, if anything. (When will someone invent a car with a Repair Me button?)
The macOS Automator application is a big hit among iMac power users. You use Automator (shown in Figure 22-5) to create customized tools that automate repetitive tasks. Of course, writing an application might sound daunting — akin to singlehandedly building your own nuclear submarine over a long weekend — but Automator is actually easy to use. Heck, you might find it downright fun!
You can also create workflows, which are sequential (and repeatable) operations that are performed on the same files or data, and then your Automator application can automatically launch whatever applications are necessary to get the job done.
Here’s a great example: You work with a service bureau that sends you a huge .zip
file every week with new product shots for your company’s marketing department. Unfortunately, these images are flat-out huge — taken with a 24-megapixel camera — and they’re always in the wrong orientation. Before you move them to the Marketing folder on your server, you have to use Preview to laboriously resize each image and rotate it, and then save the smaller version.
With help from Automator, you can build a custom application that automatically reads each image in the folder, resizes it, rotates it, generates a thumbnail image, prints the image, and then moves the massaged images to the proper folder — and all with a single double-click! Of course, you can run Automator from Launchpad, or from your Applications folder in a Finder window. Currently, Automator can handle specific tasks within many applications (including Finder), as well as a number of applications from third-party developers.
To create a simple application with Automator, launch the application and follow these steps:
Click the desired application in the Library list.
Automator displays the actions available for that application.
Click the Run button (at the upper right) to test your script.
Use sample files while you’re fine-tuning your application lest you accidentally do something deleterious to an original (and irreplaceable) file!
Click Save.
Your new Automator application icon includes the Automator robot standing on a document. Most normal human beings would call you a programmer, so make sure you’re inscrutable from now on! If you plan to use your new Automator application often, don’t forget that you can make it more convenient to use by dragging the application icon to the Dock or to the desktop.
If you want your Automator application to run every time you log in (to track your time on a project, for example), follow these steps to set up the Automator application as a login item:
Click Add.
Now your Automator application is really automatic. Watch your significant other gape in amazement as your iMac begins to work without your touching the keyboard! (If you’ve added the application icon to your Dock, you can also simply right-click the icon and choose Options ⇒ Open at Login from the menu that appears. Either way, your iMac gets the message.)
I prefer my iMac to take care of cleaning up after itself, so updating macOS should be automatic as well. In macOS Monterey, operating system updates are performed by the Software Update pane within System Preferences.
Updates are available in two convenient spots:
System Preferences: Click the Software Update icon in the System Preferences window.
To set Software Update to check for critical system updates and install them automatically, simply select the Automatically Keep My Mac Up To Date check box to enable it, click the Advanced button and make sure that all the check boxes are enabled, and then click OK.
If you’d rather handle updates manually — perhaps your iMac performs critical work in a video production house or lab and you’d prefer to verify that your software will be unaffected by the update — you can always disable this check box. When you’re satisfied that the update is safe, display the Software Update pane again and click the Update button to start the ball rolling.