Tom Ritch

Q: delete difficult files?

On my MacBook Pro (Retina, 15-inch, Late 2013) I have files I cannot delete.  They were created as a local Time Machine archive when the regular destination was not available. 

 

When I discovered them I tried moving to the trash and emptying.  The files were copied into the trash, not moved, so I have to find a different way.  I was able to get all of them together in one folder, "TrashMe", in my home user space.  I do not know much UNIX, but I tried sudo rm, rmdir, etc.  I deleted enough that these are no longer Time Machine archives, but still a lot remains.  I looked down through the folder structure and found Crashplan files at the bottom.  Crashplan tech support helped me get rid of those, but more remains which I cannot delete.  I get error messages, some of which I will show.

 

In Finder, I select TrashMe, and Get Info shows "You can read and write" and these users have these permissions

 

everyone          Read & Write

ritch (Me)          Read & Write

everyone           Read & Write

 

I changed the permissions to as shown, then chose Apply to enclosed items.  However, that did not work.  Within TrashMe are folders like this

 

Screen Shot 2016-09-14 at 8.17.14 PM.png

I have no access to these files in Finder.  In Terminal I can ls and cd my way through the file structure.  I find structures like

 

Trash me/MobileBackups_2015-10-11-203305/Computer/2015-10-10-041640/Volume/System/Lib rary/Core Services/file:///Users/ritch/TrashMe/MobileBackups_2015-10-11-032838/Computer/2 015-10-09-080851/Volume/System/Library/CoreServices/CoreTypes.bundle/

 

I think what happened is Time Machine, perhaps interacting in some confused way with Crashplan, created local archives of my system files, and the system files have special protection so users cannot accidentally erase them.  If Time Machine could recognize this as an archive, probably it has way to delete protected files, but I mangled the file structure so it no longer looks like an archive. 

 

I think there must be a way to do this in Terminal.  Can someone please suggest command lines which I should type to erase these files?  There are I think tens of thousands of files, so please give me recursive forms

Mac Pro, OS X El Capitan (10.11.6), MacPro 3,1 Accelsior PCIe SSD

Posted on Sep 14, 2016 8:34 PM

Close

Q: delete difficult files?

  • All replies
  • Helpful answers

  • by TheExpolsiveCow,

    TheExpolsiveCow TheExpolsiveCow Sep 14, 2016 8:46 PM in response to Tom Ritch
    Level 2 (440 points)
    Mac OS X
    Sep 14, 2016 8:46 PM in response to Tom Ritch

    You could log in as root admin and delete theme probably.

    Good luck.

  • by Boyd Porter,

    Boyd Porter Boyd Porter Sep 15, 2016 12:06 PM in response to Tom Ritch
    Level 4 (1,002 points)
    Sep 15, 2016 12:06 PM in response to Tom Ritch

    Turn off Time Machine and wait a few minutes. The files will be deleted. Turn Time Machine back on. The space those files use will be recovered if space gets low.

     

    Have a nice day.

  • by Tom Ritch,

    Tom Ritch Tom Ritch Sep 16, 2016 11:16 AM in response to TheExpolsiveCow
    Level 2 (206 points)
    Photos for Mac
    Sep 16, 2016 11:16 AM in response to TheExpolsiveCow

    Thanks for the suggestion.  I don't doubt that as root I could do anything.  Problem is, as root I could do anything. 

     

    When OS X first came out I was not hesitant to change things around to be as I thought they should be. The result too many times was the final solution required reinstalling the System, sometimes reformatting the disk.  Those memories make me cautious.  Now I realize that when I can't do something, there may be a god reason why.  I suppose working as root would solve the problem, and with everything backed up, if it came to reformatting that would not be a disaster. 

     

    I was hoping for a less drastic method, like making the files deletable somehow. 

     

    Considering what I could do to my system by accident, being advised to just try working as root by an exploding cow might make an interesting story ... 

  • by Tom Ritch,

    Tom Ritch Tom Ritch Sep 16, 2016 11:30 AM in response to Boyd Porter
    Level 2 (206 points)
    Photos for Mac
    Sep 16, 2016 11:30 AM in response to Boyd Porter

    Thanks for the suggestion, Boyd.  This is the sort of "less drastic" idea I was hoping for.  It might have worked on the original files, or maybe not.  I think a complication was that Crashplan files were in the Time Machine archives, and Crashplan had marked its file with its own no-delete flags. 

     

    In any case, turning Time Machine off and leaving the computer on overnight did not result in any change. 

     

    When I started trying to clean this up the undeletable files took about 400 GB on disk.  Now TrashMe takes only 12 MB, I think because it is only a lot of directories.  Grand Perspective still tells me I still have 63 GB of "Miscellaneous use space".  That is a lot of mystery files, but the mystery is a lot smaller than the 400 GB I started with.  None of this is an awful problem.  More of a minor irritation I hoped to clean up, which now frustrates me by being so difficult.