APFS Snapshots: How to Roll Back to a Previous Known State

Apple file system lets you go back in time

One of the many features built-in to APFS (Apple File System) on the Mac is the ability to create a snapshot of the file system representing the state of your Mac at a specific point in time.

Snapshots have a number of uses, including creating backup points that allow you to return your Mac to the state it was in at the point in time the snapshot was taken.

Information in this article applies to Macs running macOS Catalina (10.15) through macOS High Sierra (10.13).

Apple provides only minimal tools for taking advantage of the APFS snapshot feature, but you can use snapshots now to help you in managing your Mac. The Mac makes automatic snapshots whenever you upgrade your system, and you can make manual snapshots at any time.

Automatic Snapshots for macOS Updates

Starting with macOS High Sierra and the introduction of the APFS file system, Macs use snapshots to create a backup point. You can use a snapshot to recover from an operating system upgrade that goes wrong or return to the previous version of the macOS if you don't like an upgrade.

In either case, the rollback to the saved snapshot state does not require you to reinstall the old OS or restore information from backups you may have created in Time Machine or third-party backup software.

This process is fully automatic; there is nothing you need to do other than run the macOS update from the Mac App Store to create a snapshot you can roll back to — should the need arise. Here's how it works:

  1. Launch the App Store from the Dock or the Apple menu.

  2. Select the new version of the macOS you want to install or select a system update from the Updates section of the App Store.

  3. Start the update or installation.

  4. After you agree to the license terms, the Mac takes a snapshot of the current state of the target disk for the installation before files are copied to the target disk. The install process then continues.

Snapshots are a feature of APFS. If the target drive is not formatted with APFS, no snapshot is saved.

Although major system updates include the creation of an automatic snapshot, Apple has not specified what is considered an update significant enough that a snapshot is generated automatically,

If you would rather be sure about having a snapshot to roll back to, should the need arise, you can create your own snapshot manually.

Manually Create APFS Snapshots

Automatic snapshots are all fine and good, but they are only generated when major system updates are installed. Snapshots are such a reasonable precautionary step that you may want to create a snapshot before you install new apps or perform tasks such as cleaning up files.

You can create snapshots at any time by making use of the Terminal app, a command line tool that is included with your Mac.

If you haven't used Terminal before or you're not familiar with the Mac command line interface, don't worry. Creating snapshots is an easy task.

  1. Launch Terminal, located in Applications > Utilities.

    The Terminal window that opens contains the command prompt, which usually includes the name of your Mac, followed by your account name and ending with a dollar sign ($), which marks the place where Terminal is waiting for you to enter a command. You can enter commands by typing them or by copying and pasting the commands. Commands are executed when you click the ​Return or Enter key on the keyboard.

  2. To create an APFS snapshot, copy and paste the following command into Terminal at the command prompt:

    tmutil snapshot
  3. Press Enter or Return on the keyboard.

    Terminal responds by saying it has created a local snapshot with a specific date.

    Using Terminal to manually create an APFS snapshot
  4. You can check to see if there are any snapshots already present with the following command:

    tmutil listlocalsnapshots /

    This command displays a list of any snapshots that are already present on the local drive.

How to Roll Back to an APFS Snapshot Point in Time

Returning your Mac's file system to the state it was in previously using a snapshot requires a few steps that include the use of the Recovery HD and the Time Machine utility.

Although the Time Machine utility is involved, you do not have to have Time Machine set up or use it for backups, although it is not a bad idea to have an effective backup system in place.

APFS snapshots from the Time Machine utility

If you ever need to restore your Mac to a saved snapshot state, here's how you do it:

  1. Restart your Mac while holding down the Command and R keys. Keep both keys pressed until you see the Apple logo appear. Your Mac boots into Recovery mode, a special state used for reinstalling the macOS or repairing Mac issues.

  2. The Recovery window opens with the title macOS Utilities and presents four options: Restore From Time Machine Backup, Reinstall macOS, Get Help Online, and Disk Utility.

  3. Select Restore From Time Machine Backup and click Continue.

  4. A list of disks connected to your Mac that contain snapshots (and Time Machine backups) is displayed. Select the disk that contains the snapshots — this is usually your Mac's startup disk — and click Continue.

  5. Select the snapshot you want to restore from the list of snapshots. They are sorted by date and the macOS version in which they were created. Click Continue.

  6. A drop-down window asks if you really want to restore from the selected snapshot. Click Continue to proceed.

    The restore begins, and a process bar displays. When the restore is complete, your Mac reboots automatically.

A Few Snapshot Notes

APFS snapshots are stored only on disks that are formatted with the APFS file system.

Snapshots are only created if the disk has plenty of free space.

When storage space decreases, snapshots are deleted automatically, starting with the oldest first.