If you’re trying to remove a Time Machine backup from a drive and find that it’s stuck in the Mac Trash with a specific error message stating the trash can’t be emptied because “Some items in the Trash cannot be deleted because of System Integrity Protection”, then read on to learn how to resolve this particular Time Machine backup removal problem.
Note: this troubleshooting walkthrough is focused exclusively on when a Time Machine backup is stuck in the Trash with the accompanying SIP related error message stating “Some items in the Trash cannot be deleted because of System Integrity Protection” with three options available, ‘Cancel’, ‘Remove Unlocked Items’, and ‘Remove All Items’ – the fixes discussed here will address this error message pertaining to SIP limits on removal of Time Machine backups specifically. There are other possible reasons (and solutions) as to why a Time Machine backup can get stuck in the Trash and nearly impossible to delete, including the seemingly endless “preparing to empty the Trash” message with Time Machine backups, which can also prevent a backup from being trashed the regular way. If you do not see the ‘System Integrity Protection’ error message when trying to remove the Time Machine backup then skip this walkthrough and instead focus on this guide, or even just deleting old Time Machine backups from Time Machine directly on the Mac.
How to Fix Stuck Time Machine Backups in Mac Trash with “items in the Trash cannot be deleted because of System Integrity Protection” Error
As the “Some items in the Trash cannot be deleted because of System Integrity Protection” error message implies, the reason the Time Machine backup is stuck in the Trash and unable to be deleted is because System Integrity Protection, or SIP, is enabled and protecting that particular backup from removal. SIP is a feature that locks down important system files to prevent their removal, but in this particular case it’s also preventing the removal of an old Time Machine backup file. Thus, we’ll temporarily disable SIP, trash the stuck Time Machine backup, then re-enable SIP. Here are the full steps:
- Backup the Mac before beginning, either with Time Machine or otherwise
- Go to the Apple menu and choose “Restart” to reboot the Mac
- Once you hear the boot sound or see the Apple logo on screen, press and hold COMMAND and R keys concurrently to boot the Mac into Recovery Mode
- Once you see the “MacOS Utilities” (or “OS X Utilities”) screen you’re in Recovery Mode, ignore the initial onscreen options and instead pull down the “Utilities” menu at the top of the screen and then select “Terminal”
- At the command line prompt, enter the following command string:
- Hit “Return” on the keyboard to disable SIP and instantly restart the Mac again
- Let the Mac boot up as usual with System Integrity Protection disabled
- When the Mac has finished booting up, return to placing the old Time Machine backup in the Mac Trash can and then choose “Empty Trash” to remove the stuck Time Machine backup *
- Once the trash emptying process has completed and the once stuck Time Machine backup is deleted, you can now reboot the Mac and re-enable System Integrity Protection
- Restart the Mac as usual and immediately hold down COMMAND + R keys again to enter into Recovery Mode
- Again pull down the ‘Utilities’ menu and choose “Terminal” then enter the following command string to enable SIP:
- Hit return to restart the Mac up again as usual, this time with System Integrity Protection enabled again, where you can use the Mac as usual
csrutil disable; reboot
csrutil enable; reboot
(Note that deleting a Time Machine backup by dumping it into the Trash and emptying the Trash can take quite a while, so be prepared for that. If the backup is huge, you might want to let it sit overnight as it empties from the Trash successfully, in which case you still want to resume the steps to enable SIP again afterwards.)
Assuming you followed the instructions correctly, you should not see the “Some items in the Trash cannot be deleted because of System Integrity Protection” error message when trying to delete the stuck Time Machine backup from Mac Trash again, it will just empty the Trash as normal.
It’s very important to enable System Integrity Protection again on the Mac, as it offers security and privacy protection benefits that won’t work if it’s disabled. Don’t skip that step after you successfully trash the stuck Time Machine backup file.
* If you are still encountering problems, you can either go to the command line and forcibly delete the backups from the Trash with these instructions, or you can put back the stuck Time Machine backup file and focus on the dated specific backup folder you want to delete, these are contained inside the “Backup.backupdb” directory.
Alternative Method: Using tmutil to Properly Remove the Time Machine Backup
** Another option is to use the command line tmutil command, which is a more proper way to delete an old Time Machine backup in the first place.
To try this approach, you need to have the Time Machine backup in its original location on the backup drive, so first go to the Trash in MacOS and right-click on the stuck backup and choose “Put Back”. Then do the following:
- Open the “Terminal” application found in /Applications/Utilities/
- Type the following command string, replacing “DRIVENAME” with the name of the Time Machine backup volume, and replacing “SPECIFICBACKUPNAME” with the specific dated backup folder you’re trying to delete:
- Hit return and enter the admin password as required by sudo, this will instantly delete the Time Machine backup with tmutil
sudo tmutil delete /Volumes/DRIVENAME/Backups.backupdb/SPECIFICBACKUPNAME
However you resolved the issue, once the stuck Time Machine backup is trashed and removed successfully, you can resume using Time Machine for backups on the Mac as usual.
Time Machine is a great feature, and all Mac users should regularly use Time Machine to backup their entire Mac and personal data so that if something goes awry they can easily restore their machine and data to its proper state.
Did the above trick work for you to successfully remove the stuck Time Machine backups from the Mac Trash? Did you use one method or another, or a different entirely? Share with us in the comments below!