Chapter 21

Tackling the Housekeeping

IN THIS CHAPTER

Bullet Cleaning unnecessary stuff off your drive

Bullet Backing up your data

Bullet Fixing hard drive permission errors and catalog problems

Bullet Automating tasks in Big Sur

Bullet 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 Big Sur 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 Big Sur 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).

Cleaning Unseemly Data Deposits

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.

Getting dirty (cleaning things the manual way)

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.

Unnecessary files and unneeded folders

Consider all the stuff you probably don’t really need:

  • Game demos and shareware that you no longer play or use (or even remember)
  • Movie trailers and other QuickTime video files that have long since passed into obscurity
  • Temporary files that you created and promptly forgot about
  • Log files that chronicle application installations and errors
  • Zip archives that you downloaded and no longer covet
  • GarageBand loops and iMovie video clips you’ll never use
  • Music and videos that no longer appeal to your eye and ear

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:

  • You can use the Storage Management feature — a part of the Big Sur System Information application — to display space-hogging files and easily remove them. To display the Storage Management screen, display the Spotlight search box and type Storage; then click the Storage Management entry in the list. On the Sidebar, you’ll see your files arranged by categories, as well as how much total storage space that type of file is using on your system. Click the Review Files button in the Reduce Clutter section of the window, and the application lists the biggest offenders. (Pun unfortunately intended.) To delete a file, click it and then click Delete.
  • You can delete files manually as you encounter them while navigating through Finder windows.
  • You can move seldom-used files and folders to external storage (such as a USB flash drive, an external hard drive, or a DVD).
  • You can use Launchpad to uninstall applications that you purchased from the App Store. In Launchpad, click and hold down an application’s icon until all the icons wiggle. If an X button appears on the icon, you can click the X to remove the application from your MacBook and recover that space.
  • You can get rid of an unnecessary application by deleting the folder that was created for it during the installation process.

Warning Always check the application’s readme file and documentation for any special instructions before you delete any application’s folder! If you created 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 with their own uninstall utility, so checking the readme file and documentation may save you unnecessary steps.

Manually removing an application or file from your drive usually involves two simple steps:

  1. Display the file or application folder in a Finder window.
  2. Delete the file or folder by doing one of the following:
    • Drag the icon to the Trash.
    • Press ⌘   +Delete.
    • Right-click the icon and choose Move to Trash from the shortcut menu.
    • Select the icon, and click the Delete button on the Finder toolbar (if you added one).

Truly, removing a file or application is no big whoop.

Remember Don’t forget to actually empty the Trash, or you’ll wonder why you aren’t regaining any drive space. (Big Sur stores the contents of the Trash until you empty the Trash, just in case you want to undelete something.) To get rid of that stuff permanently and reclaim the space, right-click the Trash icon on the Dock and choose Empty Trash from the shortcut menu.

Associated files in other folders

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:

  1. Click the Search text box in a Finder window.

    You can read more about searching and the Finder window in Chapter 6.

  2. 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 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.

  3. Decide which of these files belong to the application to be deleted.

    Warning 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 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.

  4. In the Search Results window, click the associated files you want to delete, and drag them to the Trash.
Snapshot of the internal drive for associating files to delete.

FIGURE 21-1: Mine your internal drive for associated files to delete.

Warning Don’t empty the Trash immediately after you delete these associated files. Wait a few hours or a day. That way, if you realize that you deleted a file you truly need, you can easily restore it from the Trash.

Using a commercial cleanup tool

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 $30.

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!

Snapshot of Piriform’s CCleaner for Mac which is a great tool for cleaning your MacBook’s drive.

FIGURE 21-2: Piriform’s CCleaner for Mac is a great tool for cleaning your MacBook’s drive.

Backing Up Your Treasure

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:

Marksmaxim Back up your internal drive. On a regular basis.™

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 Big Sur.

Saving files

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.

Backing up to an external drive or USB flash drive

If you use an external drive with your MacBook, you can easily drag backup files to it from your internal drive. Follow these steps:

  1. Open separate Finder windows for

    • The external drive
    • The internal drive

    Because you’re using Big Sur, you can also open a Finder tab within a single Finder window to accomplish the same task. To do so, press ⌘   +T.

  2. On your internal drive, select the files and folders you want to back up.
  3. Drag the selected files to the external drive’s window.

Backing up to CD and DVD

You can burn backups of your most important files to a recordable CD or DVD, but you’ll need to use an external SuperDrive or third-party recorder to do it. 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:

  1. Load a blank disc into your MacBook’s external optical drive.

    If you’re using the default settings in the CDs & DVDs pane of System Preferences, macOS asks you for a disc name.

  2. Choose Open Finder from the Action pop-up menu, and click OK.
  3. Double-click the Untitled optical disc icon on your Desktop to open a Finder window that shows the contents of the disc.
  4. 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.

  5. 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.

  6. Choose the fastest recording speed possible.
  7. Click Burn.

Tip If you’ve invested in Creator NXT 7 from Roxio (https://www.roxio.com) or another CD/DVD recording application, you can create a new disc layout to burn the same files to your backup disc in the future. (Think of a layout as a road map that indicates which files and folders Toast should store on the backup.)

Tip “Mark, can I back up individual files to cloud-based storage like iCloud Drive or Dropbox?” Of course! These services are fine for a few files (much like backing up a few files to CD or DVD), but these cloud drives aren’t suitable for backing up the entire contents of your MacBook’s internal drive. You should always use Time Machine with an external drive for that important chore. Also, don’t forget that you need an Internet connection to save or retrieve files from cloud storage. (If you’d like to store just the most important stuff in the cloud, I would suggest the contents of your Desktop and Documents folders.)

Putting things right with Time Machine

If you enable backups via the Big Sur 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!)

Tip If you don’t mind investing in legacy hardware, Apple’s AirPort Time Capsule device is designed to be a wireless storage drive for your Time Machine backup files. If you’re interested in a single Time Machine backup location for multiple Macs across your wireless network, Time Capsule is a great addition to your home or office. Note, however, that Apple no longer sells the Time Capsule, so it’s off to eBay (or your favorite used-hardware swap shop) you go. Also, keep in mind that the Time Capsule drive isn’t meant to be mobile, so while you’re on the road, you still need an external USB-C or Thunderbolt drive to safeguard your data.

Remember Before you can use Time Machine, you must enable it on the Time Machine pane of System Preferences. I cover the Time Machine configuration settings (and how to turn the feature on) in detail in Chapter 5.

Here’s how you can turn back time, step by step, to restore a file or folder you deleted or replaced:

  1. In a Finder window, open the folder that contained the item you want to restore.
  2. An illustration of the snapshot of clock icon. 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 Big Sur has made.

  3. 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!)

    Tip The backup date of the items you’re viewing appears on the button bar at the bottom of the screen.

  4. After you locate the file or folder you want to restore, click it to select it.
  5. Click the Restore button on the Time Machine button bar.

    If you want to restore all the contents of the current folder, click the Restore All button instead.

Snapshot of the different apps.

FIGURE 21-3: Yes, Time Machine really does look like this!

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:

Marksmaxim Connect a high-capacity external drive, and turn on Time Machine. Do it now. Don’t make a humongous mistake.™

Maintaining Drive Health

Shifty-eyed, sneaky, irritating little problems can bother both your internal and external drives: permissions errors. Incorrect disk and file permissions can

  • Make your MacBook lock up
  • Make applications act screwy (or refuse to run)
  • Cause weird behavior in a Finder window or System Preferences

Tip To keep Big Sur running at its best, I recommend that you check your internal drive at least once per week.

To fix drive errors on your system, follow these steps:

  1. An illustration of the snapshot of rocket icon. Click the Launchpad icon on the Dock and then click the search box at the top of the window.
  2. An illustration of the snapshot of Disk Utility icon. Type the word disk.
  3. Click the Disk Utility icon.
  4. On the left side of the Disk Utility dialog, click the volume or named partition you want to check.
  5. Click the First Aid button.
  6. 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?)

Automating Those Mundane Chores

One popular feature in Big Sur — 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 Big Sur.)

Snapshot of the Automator page.

FIGURE 21-4: Automator is a dream come true if you hate repetitive tasks.

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 your Applications folder. Currently, Automator can handle specific tasks in many Apple applications — including the Finder — as well as a number of applications from third-party developers.

To create a simple application with Automator, launch the application and then follow these steps:

  1. Click the New Document button.
  2. Select Application from the setup dialog that appears, and click the Choose button.
  3. Click the desired application in the Library list.

    Automator displays the actions that are available for that application.

  4. Drag the desired action from the Library window to the workflow window on the right.
  5. Modify any specific settings provided for the action you chose.
  6. Repeat Steps 3 through 5 until you’ve completed the workflow.
  7. Click the Run button in the top-right corner to test your script.

    Warning Use sample files while you’re fine-tuning your application, lest you accidentally do something deleterious to an original (and irreplaceable) file!

  8. When the application is working as you like, press ⌘   +S to save it.
  9. In the Save dialog that appears, type a name for your new application.
  10. Click the Where pop-up menu and specify a location where the file should be saved.
  11. Click the File Format pop-up menu and choose Application.
  12. 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.

Tip To find all the actions of a certain type in the Library list, click in the search box at the top of the list and type a keyword, such as save or burn. You don’t even need to press Return!

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:

  1. Open System Preferences.
  2. Display the Users & Groups pane.
  3. Click the Login Items button.
  4. Click the plus button at the bottom of the list.
  5. Navigate to the location of your new Automator application.
  6. 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.

Updating macOS Automatically

I prefer that my MacBook clean up after itself as much as possible, so updating macOS should be automatic as well. In Big Sur, updates are performed in the Software Update pane of System Preferences.

Tip Updating macOS requires an Internet connection to shake hands with the Apple server and download any updates.

You can find updates in two convenient spots, so pick your favorite:

  • The Apple menu (App): Choose App  ⇒    About This Mac.

    In the resulting window, click the Software Update button. Big Sur alerts you to anything new that’s available.

  • An illustration of App store icon. System Preferences: Click the Software Update icon in the System Preferences window.

    In the Software Update pane, click the Advanced button to set Big Sur to check for critical system updates and install them automatically:

    • Select the Check for Updates check box to enable it.
    • Select the Download New Updates When Available check box to enable it.
    • Select the Install macOS Updates check box to enable it.
    • Select the Install System Data Files and Security Updates check box to enable it.

Tip With automatic downloading disabled, Big Sur displays a Notification window alerting you to new updates. You can choose to continue with the update from the Notification window or wait to update later manually.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset