Chapter 21
IN THIS CHAPTER
Cleaning unnecessary stuff off your drive
Backing up your data
Fixing hard drive permission errors and catalog problems
Automating tasks in Catalina
Updating macOS
Nothing runs better than a well-oiled machine, and your laptop is no exception. (Well, you actually shouldn’t oil it, but you know what I mean.) With a little Catalina maintenance, you can ensure that your MacBook performs as efficiently as possible, which translates into longer battery life and faster operation overall.
In this chapter, I demonstrate how you can make good use of every byte of storage space provided by your drive. I also show you how to back up and restore that internal drive to an external drive by using Time Machine.
The Catalina Automator application is a great housekeeping tool. It allows your laptop to perform tasks automatically that used to require your attention. I show you how you can create Automator applications and set them up to run by themselves. (It sounds a little spooky, but you’ll have a ball!)
And it’s important to never forget about updating macOS itself. But then again, with Software Update configured correctly, you can live life free and easy, surfing the web and eating ice cream (or yogurt — your pick).
Criminy! Where does all this stuff come from? Suddenly, that spacious 512GB solid-state drive has only 19GB left, and you’re starting to feel pinched.
Before you consider buying a new internal or external drive (which you can read about in Chapter 20), take the smart step: Sweep your laptop’s drive clean of unnecessary, space-hogging software and temporary files.
If you’re willing to dig into your data a little, you have no reason to buy additional software to clean up your hard drive. All you really need is the willpower to announce, “I simply don’t need this item any longer.” Sometimes, that’s tougher than it may seem.
Consider all the stuff you probably don’t really need:
How hard is it to clean this stuff off your drive? Easier than you might think! Here are some ways to clear space on your laptop’s internal drive:
Removing an application or file from your drive usually involves two simple steps:
Truly, removing a file or application is no big whoop.
Some applications install files in different locations across your drive. (Applications in this category include Microsoft Office and 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 searching and the Finder window in Chapter 6.
Type the name of the application in the Search text box, and choose Name Matches from the pop-up menu.
Figure 21-1 shows a typical search. I wanted to remove orphan files associated with Adobe Acrobat XI Pro. By searching for the word Adobe, I found both the application and its main folder. 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 application to be deleted.
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 21-1, the Adobe AIR Uninstaller is included in the search results, but it’s definitely not part of Adobe Acrobat!
Many associated files either have the same icon as the parent application or are in the Preferences, Caches, or Application Support folder.
If you’d rather use a commercial application to clean up your drive, many applications are available, but most are shareware and perform only one task. Tidy Up 5 from Hyperbolic Software (www.hyperbolicsoftware.com
), for example, finds only duplicate files on your drive, matching by criteria such as filename, size, content, and extension. It’s a good tool at $35.
For keeping your MacBook’s drive slim and trim, I recommend CCleaner for Mac, from Piriform (https://www.piriform.com/mac/ccleaner
, shown in Figure 21-2. 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 the standard version is free? I really like free!
Do it. I won’t lecture you about backing up your drive. Well, perhaps for just a moment. Imagine what it feels like to lose everything: names, numbers, letters, reports, presentations, saved games, photographs, and music. Then ask yourself, “Self, isn’t all that irreplaceable stuff worth just a simple backup?” It’s time for a Mark’s Maxim:
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 in Catalina.
The simplest way to back up files is simply to copy the files and folders to an external drive, a USB flash drive, a CD, or a DVD. It’s nothing fancy, but it works.
If you use an external drive with your MacBook, you can easily drag backup files to it from your internal drive. Follow these steps:
Open separate Finder windows for
Because you’re using Catalina, you can also open a Finder tab within a single Finder window to accomplish the same task. To do so, press ⌘ +T.
You can burn backups of your most important files to a recordable CD or DVD. Owners of recent-vintage MacBooks need to use an external SuperDrive or third-party recorder, however. Saving your data is more labor-intensive this way, but the result is a truly bulletproof backup that doesn’t rely on an external drive.
To use the Finder’s Burn feature with a CD or DVD, follow these steps:
Load a blank disc into your MacBook’s optical drive.
If you’re using the default settings in the CDs & DVDs pane of System Preferences, a dialog asks you for a disc name.
Drag the files and folders you want to back up into the disc’s Finder window.
The files and folders can be organized any way you like. Don’t forget that the total amount of data shouldn’t exceed 700MB on a CD. You should also stick within 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.
Choose File ⇒ Burn Disc.
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 enable backups via the Catalina Time Machine feature, you can move backward through the contents of your MacBook’s internal 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 operating system or backup program you use. Time Machine can even handle some deleted items, such as Contacts cards!
Because Time Machine should be an important and integral part of every MacBook owner’s existence, Time Machine has its own pane in System Preferences. (Apple isn’t messing around!)
Here’s how you can turn back time, step by step, to restore a file or folder you deleted or replaced:
Click the Time Machine icon on the Finder menu bar, and choose Enter Time Machine from the resulting menu.
The oh-so-ultra-cool Time Machine history appears behind your folder, complete with its own set of buttons at the bottom of the screen, as shown in Figure 21-3. On the right, you see a timeline that corresponds to the days and months included in the backups that Catalina has made.
Click within the timeline to jump directly to a date.
The folder’s contents on that date are displayed.
Alternatively, click the Forward and Back arrows on the right to move through the folder’s contents over time. (You should see the faces of Windows users when you riffle through a specific folder to locate something you deleted several weeks ago!)
The backup date of the items you’re viewing appears on the button bar at the bottom of the screen.
Click the Restore button at the right end 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 the Finder, with the newly restored file now appearing in the folder. Outstanding!
For robust backup-and-restore protection, Time Machine has everything a typical Mac owner at home is likely to ever need. Therefore, this is an 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
Problems with your drive’s catalog file can also result in corrupted data and files that won’t open.
To fix any permissions or catalog errors on your system, follow these steps:
Click Run.
Disk Utility does the rest and then displays a message about whatever it has to fix. (When will someone invent a car with a First Aid button?)
One popular feature in Catalina — Automator — can save you a tremendous amount of time behind the keyboard. You use Automator (shown in Figure 21-4) to create applications with a relative of AppleScript called AppleEvents. (In case you’re unfamiliar with AppleScript, it’s the simple programming language you can use to automate tasks and applications within Catalina.)
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. 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 laboriously resize and rotate each image and then save the smaller versions.
With help from Automator, you can build a custom application that automatically reads each image in the folder, resizes it, rotates it, and even generates a thumbnail image or prints the image. Then it moves the massaged images to the proper folder. Normally, you’d have to launch Preview to perform the image operations and then use a Finder window to move the new files to the right location. But now, with Automator, a single double-click of your custom application icon does the trick.
You find Automator in the Utilities (or Other) folder in Launchpad (or, from a Finder window, in your Applications folder). Currently, Automator can handle specific tasks in more than 100 applications, including the Finder. But both Apple and third-party developers can add new Automator task support for both new and existing applications.
To create a simple application with Automator, launch the application and then follow these steps:
Click the desired application in the Library list.
Automator displays the actions that are available for that application.
Click the Run button in the top-right corner 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 that 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’s icon to the Dock or 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 application as a login item:
Click Add.
Now your Automator application is really automatic. Watch your significant other gape in amazement as your MacBook begins to work without your touching the keyboard!
If you’ve added the application icon to your Dock, you can also right-click the icon and choose Options ⇒ Open at Login from the shortcut. Either way, your MacBook gets the message.
I prefer that my MacBook clean up after itself as much as possible, so updating Catalina should be automatic as well. In macOS Catalina, updates are performed in the Software Update pane of System Preferences.
You can find updates in two convenient spots, so pick your favorite:
The Apple menu (): Choose ⇒ About This Mac.
In the resulting window, click the Software Update button. Catalina alerts you to anything new that’s available.
System Preferences: Click the Software Update icon in the System Preferences window.
In the Software Update pane, click the Advanced button to set Catalina to check for critical system updates and install them automatically: