閱讀655 返回首頁    go iPhone_iPad_Mac_apple


Some items in the trash cannot be deleted becau...

Hi,

 

I have a large number of files clogging up my disk- I deleted some time machine backups from that disk (which were backups of another device). Now they wont empty from the trash.

 

I need the space on the disk (its an internal drive)- any suggestions?

 

Mac mini OSX Sierra



If files are protected by the SIP, then you cannot remove them. These would not be backup files unless they are not owned by you or the computer's admin account user. Time Machine backups should only be removed in the Time Machine application provided you have access to them.

 

Turning Off Rootless System Integrity Protection in OS X El Capitan 10.11.x or Later

 

Again, the vast majority of Mac users should not disable rootless. Disabling rootless is aimed exclusively at advanced Mac users. Do so at your own risk, this is not specifically recommended.

 

  1. Reboot the Mac and hold down Command + R keys after the startup chime, this will boot OS X into Recovery HD.
  2. When the Utility Menu appears, select the Terminal from the Utilities menu in the menubar.
  3. Paste the following command into the terminal then hit return: csrutil disable; reboot
  4. You’ll see a message saying that System Integrity Protection has been disabled, and the Mac needs to restart for changes to take effect. The Mac will then reboot itself automatically.
  5. You can also issue the command by itself without the automatic reboot like so: csrutil disable

 

Once the Mac boots up again, System Integrity Protection will be disabled entirely in OS X.

 

Checking the Status of Rootless / System Integrity Protection in OS X

 

If you want to know the status of rootless before rebooting or without rebooting the Mac from the Recovery HD, just paste the following command into the Terminal: csrutil status

 

You’ll either see one of two messages:


$ csrutil status

$ System Integrity Protection status: enabled.

 

or

 

$ csrutil status

$ System Integrity Protection status: disabled

 

If at any time you want to change the status of rootless, another reboot from the Recovery HD is required.

 

How to Re-Enable Rootless System Integrity Protection in OS X

 

Simply reboot the Mac again from the Recovery HD as directed above, but at the command line use the following syntax instead: csrutil enable

 

Just as before, a reboot of the Mac is required for changes to take effect.



Never try to delete a Time Machine backup with the Finder: Can't empty the trash after deleting backups via the Finder.

 

Note:  this page has not been updated for Sierra and the System Integrity Protection feature. But the general warnings are still valid.

OTsig.png



Thank you both for that.

I must have selected this disk for TM by mistake; I know now not to drag backups to the trash!

Since the disk only contained that backup and my data, I reformatted the disk and then reinstated the data.

I thought that would be quicker than the rather scary advice above...



I had the same problem (though I only had two files that the SIP prevented from deleting).  I came across a way to force the trash to empty using Terminal.  (I found it here: https://www.imore.com/how-force-empty-trash-your-mac-using-terminal.)

 

1. Launch Terminal.

2. Enter the following command into terminal without hitting Enter afterward:

    sudo rm -R

    Notice that there is a space after R. Make sure you add a space after R or this command will not work.

3. Open Trash.

4. Select the files in Trash that you want to delete.

5. Drag the files into the Terminal window.

6. Hit Enter.

7. Enter your administrator password.  You will not see the password being typed into Terminal.  It will look like nothing has happened.

8. Hit Enter again. 

 

This worked for me.  No need to turn off the SIP, which is much more complicated and seems risky.



最後更新:2017-09-28 04:18:42

  上一篇:go iCloud Add
  下一篇:go Banner/alert notification issues (e.g. Calendar...