Time Machine是保护(Time Machine)Mac上数据的最佳方式。它能够完全自动化备份(completely automating backups)并使恢复文件和文件夹(restoring files and folders)变得容易。当您使用 Time Machine时,有时您可能需要通过删除特定的备份文件和快照来释放空间。
继续阅读以了解如何从Mac上的外部和内部存储媒体中删除Time Machine备份。
为什么必须删除Time Machine 备份(Time Machine Backups)
当您在外置驱动器上设置Time Machine时,它会为您的 Mac 数据建立一个稳定的备份或快照存档。这使您可以恢复特定版本的文件和文件夹,有时可以追溯到几年前。Time Machine足够智能,可以删除最旧的快照以创建空间,无需手动管理存储空间。
但是,如果您还将备份驱动器用作个人存储介质(仅当它是HFS+ or Mac OS Extended-formatted时才可能),您可以删除任何文件或文件夹的所有先前备份以腾出空间。或者,您可以选择删除特定快照。
此外,如果您没有连接Time Machine驱动器, Time Machine会在本地保存数据的每小时快照。(Time Machine)如果您的 Mac 内部存储空间不足,您可以通过终端(Terminal)删除单个或所有本地快照。
(Delete File)通过Time Machine删除文件和文件夹备份(Folder Backups)
Time Machine可以删除外部硬盘驱动器或SSD上任何文件或文件夹的所有备份。以下步骤不适用于APFS(Apple 文件系统)(APFS (Apple File System)) Time Machine 驱动器。
1. 将Time Machine驱动器连接到您的Mac。
2. 选择菜单栏上的Time Machine图标,然后选择(Time Machine)Enter Time Machine。或者,打开Launchpad并选择“其他(Other)” > “Time Machine”。
3. 导航到文件或文件夹的位置并选择它。如果它是您已经删除的项目,请使用Time Machine应用程序右侧的时间线,直到您在之前的快照中找到它。
4. 选择Finder窗口顶部的齿轮图标,然后选择(Gear)Delete All Backups of [File/Folder Name]。
5.在确认弹出窗口中选择确定。(OK )
6. 输入您 Mac 的管理员密码并选择确定(OK)以验证操作。
Time Machine将继续在新备份中包含文件或文件夹。如果你想阻止它,你必须将它添加到Time Machine的排除列表中(更多内容见下文)。
使用 Finder(Time Machine Snapshots Using Finder)删除Time Machine 快照
Time Machine将文件和文件夹的增量备份存储为单独的快照。您可以通过Finder访问您的(Finder)Time Machine驱动器直接删除它们。HFS+和APFS Time Machine驱动器上都是可能的。
1. 启动Finder并选择侧边栏上的Time Machine备份磁盘。
2. 打开Backups.backupdb文件夹,然后打开[Name of Your Mac]子文件夹以访问您的Time Machine备份。如果驱动器使用APFS格式,则所有快照都将存在于根目录中。
3. 找到您要删除的Time Machine快照。(Time Machine)由于快照文件名以 YYYY-MM-DD-HHMMSS 格式显示,请尝试使用名称(Name)列对它们进行排序,以便更轻松地找到要删除的特定快照。
4.按住 Control(Control)单击或右键单击要删除的快照,然后选择移至废纸篓(Move to Trash)。
5. 选择继续(Continue)确认。
6. 输入您 Mac 的管理员密码,然后选择OK。
7.按住 Control(Control)单击或右键单击Mac Dock 上的Trash图标,然后选择(Trash)Empty Trash。
注意(Note):如果您无法清空废纸篓(Trash),您必须在Mac上禁用(Mac)系统完整性保护(System Integrity Protection)。为此,请通过 macOS 恢复访问终端(access Terminal via macOS Recovery)并运行csrutil disable命令。
使用终端(Time Machine Snapshots Using Terminal)删除Time Machine 快照
删除Time Machine(Time Machine)快照的另一种方法是使用 macOS 中的终端(using the Terminal in macOS)。您首先在终端(Terminal)窗口中列出所有快照路径名称。然后,您重复运行命令以删除所需的快照。
1. 将Time Machine驱动器连接到您的Mac。
2. 打开Launchpad并选择其他(Other)>终端(Terminal)。
3. 运行以下终端(Terminal)命令查看Time Machine快照列表:
tmutil 列表备份(tmutil listbackups)
在HFS+ Time Machines驱动器上,您将看到每个快照的完整文件路径。如果驱动器是 APFS 格式的,您将只会看到文件名列表。
4. 运行以下命令删除快照,将snapshot-path/name替换为备份的路径 ( HFS+ ) 或名称 ( APFS ),同时将其括在双引号中:
sudo tmutil delete “snapshot-path/name”
5. 输入您的 Mac 管理员密码以验证操作,然后按Enter。
6. 对您要删除的任何其他快照重复此操作。
使用终端删除本地快照(Delete Local Snapshots Using Terminal)
Time Machine在 Mac 的本地存储上创建每小时自动快照,即使您没有随身携带备份驱动器,您也可以选择恢复有限数量的数据。但是,如果您即将耗尽可用空间(close to running out of free space),您可以通过终端删除它们。
1. 打开Launchpad并选择其他(Other )>终端(Terminal)。
2. 运行以下命令以显示本地快照列表:
tmutil listlocalsnapshots /
3.使用以下命令删除Time Machine快照,将(Time Machine)[snapshot-name]替换为快照的名称(仅限 YYYY-MM-DD-HHMMSS 部分):
sudo tmutil deletelocalsnapshots [快照名称](sudo tmutil deletelocalsnapshots [snapshot-name])
4. 输入您的 Mac 管理员密码以验证操作,然后按Enter。
5. 对您要删除的任何其他快照重复此操作。
禁用本地快照(Snapshots)(仅限 macOS Sierra和更早(Earlier Only)版本)
如果您是运行 macOS 10.12 Sierra操作系统或更早版本的Mac用户,您可以阻止(Mac)Time Machine创建本地快照。该操作还会强制删除所有本地快照。如果需要,您可以选择在之后重新启用本地快照。
为此,请打开终端(Terminal)并运行以下命令行:
sudo tmutil disablelocal
如果要重新激活本地Time Machine快照,请执行以下命令:
sudo tmutil enablelocal
排除(Exclude Files)Time Machine中的文件和文件夹(Folders)
您可以阻止Time Machine在其备份中包含特定文件和文件夹。如果您想阻止特定项目占用Time Machine驱动器上的存储空间(例如Safari 或 Apple TV 下载(Safari or Apple TV downloads)等临时文件),这是理想的选择。
1.按住 Control(Control)键单击或右键单击Mac Dock 上的System Preferences 图标,然后选择(System Preferences icon)Time Machine。
2. 选择Time Machine窗口右下角的选项按钮。(Options )
3. 选择添加(Add )(加号图标)。
4. 选择您要排除的文件或文件夹,然后选择排除(Exclude)。
5. 对您要排除的任何其他文件或文件夹重复此操作。
清理完成
删除旧的Time Machine备份可以帮助您释放空间,但最好让Time Machine完成它的工作,并且只有在可用存储空间开始不足时才进行干预。此外,不要忘记您可以选择从备份中排除项目并防止您的Time Machine驱动器更快地填满。
How to Delete Time Machine Backups
Timе Machine is the best wаy to safeguard the data on yoυr Mac. It іs capable of completely automating backups and makes restoring files and folders easy. As you use Time Machine, you might need to free up space sometimes by deleting specific backup files and snapshots.
Read on to learn how to delete Time Machine backups from external and internal storage media on a Mac.
Why You Must Delete Time Machine Backups
When you set up Time Machine on an external drive, it builds up a steady archive of backups—or snapshots—of your Mac’s data. That allows you to restore specific versions of files and folders, sometimes dating back years, possible. Time Machine is smart enough to delete the oldest snapshots to create space, making manual storage space management unnecessary.
However, if you also use the backup drive as a personal storage medium (only possible if it’s HFS+ or Mac OS Extended-formatted), you can delete all previous backups of any file or folder to make room. Or, you can choose to delete specific snapshots.
Additionally, Time Machine keeps hourly snapshots of your data locally if you do not have the Time Machine drive connected. If you run out of space on your Mac’s internal storage, you can delete individual or all local snapshots via Terminal.
Delete File and Folder Backups via Time Machine
Time Machine makes it possible to delete all backups of any file or folder on an external hard drive or SSD. The following steps do not apply to APFS (Apple File System) Time Machine drives.
1. Connect the Time Machine drive to your Mac.
2. Select the Time Machine icon on the menu bar and choose Enter Time Machine. Or, open the Launchpad and select Other > Time Machine.
3. Navigate to the location of the file or folder and select it. If it’s an item you’ve already deleted, use the timeline to the right of the Time Machine app until you locate it on a previous snapshot.
4. Select the Gear-icon at the top of the Finder window and select Delete All Backups of [File/Folder Name].
5. Select OK on the confirmation pop-up.
6. Enter your Mac’s administrator password and select OK to authenticate the action.
Time Machine will continue to include the file or folder in new backups. If you want to stop that, you must add it to Time Machine’s exclusions list (more on that further below).
Delete Time Machine Snapshots Using Finder
Time Machine stores incremental backups of your files and folders as separate snapshots. You can delete them directly by accessing your Time Machine drive via Finder. That is possible on both HFS+ and APFS Time Machine drives.
1. Launch Finder and select the Time Machine backup disk on the sidebar.
2. Open the Backups.backupdb folder, and then the [Name of Your Mac] subfolder to access your Time Machine backups. If the drive uses the APFS format, all snapshots will be present in the root directory.
3. Locate the Time Machine snapshot you want to delete. Since snapshot file names appear in the YYYY-MM-DD-HHMMSS format, try sorting them using the Name column to make it easier to find the specific snapshot you want to delete.
4. Control-click or right-click the snapshot you want to delete and select Move to Trash.
5. Select Continue to confirm.
6. Enter your Mac’s administrator password and select OK.
7. Control-click or right-click the Trash icon on the Mac’s Dock and select Empty Trash.
Note: If you can’t empty the Trash, you must disable System Integrity Protection on your Mac. To do that, access Terminal via macOS Recovery and run the csrutil disable command.
Delete Time Machine Snapshots Using Terminal
An alternative way to delete Time Machine snapshots involves using the Terminal in macOS. You start by listing all snapshot path names in a Terminal window. Then, you repeatedly run a command to delete the snapshots you want.
1. Connect the Time Machine drive to your Mac.
2. Open the Launchpad and select Other > Terminal.
3. Run the following Terminal command to view a list of Time Machine snapshots:
tmutil listbackups
On HFS+ Time Machines drives, you will see the full file path to each snapshot. If the drive is APFS-formatted, you will only see a list of file names.
4. Run the following command to delete a snapshot, replacing snapshot-path/name with the path (HFS+) or name (APFS) to the backup while enclosing it in double-quotes:
sudo tmutil delete “snapshot-path/name”
5. Type your Mac’s administrator password to authenticate the action and press Enter.
6. Repeat for any other snapshots you want to delete.
Delete Local Snapshots Using Terminal
Time Machine creates automatic hourly snapshots on your Mac’s local storage, giving you the option of restoring a limited amount of data even if you don’t have your backup drive with you. However, if you are close to running out of free space, you can delete them via Terminal.
1. Open Launchpad and select Other > Terminal.
2. Run the following command to reveal a list of local snapshots:
tmutil listlocalsnapshots /
3. Delete the Time Machine snapshot using the command below, replacing [snapshot-name] with the name of the snapshot (YYYY-MM-DD-HHMMSS portion only):
sudo tmutil deletelocalsnapshots [snapshot-name]
4. Type your Mac’s administrator password to authenticate the action and press Enter.
5. Repeat for any other snapshots you want to delete.
Disable Local Snapshots (macOS Sierra and Earlier Only)
If you’re a Mac user running the macOS 10.12 Sierra operating system or earlier, you can stop Time Machine from creating local snapshots. The action also forcibly deletes all local snapshots. You can choose to re-enable local snapshots afterward if you want.
To do that, open Terminal and run the following command line:
sudo tmutil disablelocal
Execute the command below if you want to reactivate local Time Machine snapshots:
sudo tmutil enablelocal
Exclude Files and Folders in Time Machine
You can prevent Time Machine from including specific files and folders in its backups. That’s ideal if you want to stop particular items from consuming storage on the Time Machine drive—e.g., temporary files such as Safari or Apple TV downloads.
1. Control-click or right-click the System Preferences icon on the Mac’s Dock and select Time Machine.
2. Select the Options button on the lower-right corner of the Time Machine window.
3. Select Add (plus-shaped icon).
4. Pick the file or folder you want to exclude and select Exclude.
5. Repeat for any other files or folders you want to exclude.
Cleanup Complete
Deleting old Time Machine backups can help you free up space, but it’s best to let Time Machine do its thing and only intervene if available storage starts running low. Also, don’t forget that you can choose to exclude items from your backups and prevent your Time Machine drive from filling up faster.