Can not empty trash. I have tried EVERYTHING!

Discussion in 'macOS' started by tennismanclay, Mar 25, 2008.

  1. tennismanclay macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #1
    I have been on the computer for over 3 hours, literally. I can not find an answer anywhere.

    I moved a unfinished time machine backup to my trash, and i cannot seem to empty my trash. I could literally list a full page of terminal commands i have found and tried that didnt work. The attachment is what my trash looks like. I thought about listing everything i have tried but it would take forever to type.

    The last few hours have been the worst nightmare of figuring out how to do something on a mac. Im so flustered i can hardly talk, if you know what i mean.



    So if any of you know how to get rid of these files in my trash (also in my external .Trashes folder) please, please share. When i unplug my drive they go away but anyways.


    EDIT: if someone could explain what those weird files are in my trash i would sure like to know.
    EDIT 2: The second attachment is what a secure delete does, and waiting around 4 hours. Also i cant reformatt the drive, i have over 70gb of stuff that i can't lose.
    thanks in advance
     

    Attached Files:

  2. Eidorian macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #2
    You tried a sudo rm -rf 'directory'? I had to use it to blast away my failed backups ages ago.

    WARNING: DON'T TRY THAT COMMAND UNLESS YOU KNOW WHAT YOU'RE DOING.
     
  3. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #3
    Why is it so drastic? it could potentially delete all of your data, How. i mean you put that command and then the directory, and whatever directory it is gets deleted, except for in my case.

    I half-ly know what im doing =]


    and my system is fine after doing those commands btw.


    EDIT: and that command didnt work. forgot the error message tho
     
  4. iTeen macrumors 65816

    iTeen

    Joined:
    Aug 13, 2007
    Location:
    Washington
    #4
    download MainMenu for OSX, then you have a option to "force empty" the trash, it works, i have used it a few times on some stubborn items.
     
  5. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #5
    i give you serious props for getting my hopes up so high. I really thought it was going to work. But after its done there still there...




    EDIT: actually it never ends, it just stops and takes the icon out of the menubar. weird, maybe on of the files is causing it to do that.
     
  6. Eidorian macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #6
    Have you tried to unmount and remount the volume?
     
  7. iTeen macrumors 65816

    iTeen

    Joined:
    Aug 13, 2007
    Location:
    Washington
    #7
    wow i am really sorry, i thought this would work.
    please try this
    and this... I hope one of these tips work for you.
     
  8. Luis macrumors 65816

    Luis

    Joined:
    Jul 19, 2006
    Location:
    Costa Rica
  9. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #9
    yes
     
  10. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #10
    when i did it the first 5 or so times it would stop after about 15 seconds, but this time its been going for like 2 minutes, it might work..
     
  11. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #11
    but a no go for me :/
     
  12. Luis macrumors 65816

    Luis

    Joined:
    Jul 19, 2006
    Location:
    Costa Rica
    #12
    It seems you are deleting your timemachine backups right? Have you tried first disabling time machine and then emptying the trash (or running the script)? Only think I can think of.
     
  13. xraydoc macrumors demi-god

    xraydoc

    Joined:
    Oct 9, 2005
    Location:
    192.168.1.1
    #13
    Don't know if you've tried, but turn off Time Machine then reboot. Then try emptying what's left in the trash.
     
  14. Sky Blue Guest

    Sky Blue

    Joined:
    Jan 8, 2005
    #14
    Log in as Safe Mode (hold down Shift at Start up), and empty the trash.
     
  15. bluedoggiant macrumors 68030

    bluedoggiant

    Joined:
    Jul 13, 2007
    Location:
    MD & ATL,GA
    #15
    How about waiting till it finishes preparing the items to delete?
     
  16. Globetrotter macrumors regular

    Globetrotter

    Joined:
    Nov 5, 2007
    Location:
    London
    #16
    Perhaps it is something to do with the 'hard links' that TM uses?
     
  17. mason.kramer macrumors 6502

    mason.kramer

    Joined:
    Apr 16, 2007
    Location:
    Watertown, MA
    #17
    More information needed. Do you want to delete an entire archive, or just one backup point?

    What, EXACTLY, did you drag to the trash? (I.E., Time Machine creates a sparsebundle, and inside of that sparse bundle it creates files representing backup points. Did you drag the sparsebundle, a single backup point that was in the process of being created, or what?)

    On what, exactly, have you been trying your terminal commands? Is it the file structure on the external volume, or the files in the trash?

    What error messages have you received? For instance, when you tried rm -rf on the offending files, what did it report? If nothing, what about rm -rfv?

    We are trying to figure out where these files are actually residing on your disks. We use ls (list directory command) with the -a flag to list hidden files as well.

    First, open your trash, select one of the time machine folders that you're trying to delete, cmd-i to get info, and look at the Where: line. That will probably be sufficient to find the real location of the offending files. Try rm -rfv on that path that is displayed on the Where: line.

    If that doesn't work, please post the output from
    Code:
    ls -a ~/.Trash/
    ls -a /.Trash/
    ls -a /Volumes/TimeMachineVolume/ # substitute the real name of your time machine volume
    ls -a /Volumes/TimeMachineVolume/.Trashes # ditto substitution
    ls -a /Volumes/TimeMachineVolume/.Trashes/501/ 
    
    NOTE: When I checked this on a disk image that I just created to check this, I found that all of my trashed stuff was actually moved to a folder called /501/ inside of .Trashes. I don't know why it does this; perhaps your number will be different, but if you have a number, check inside of it to see if your offending files are there.

    Now, my wild guesses:

    1. The weird files are almost certainly corrupted files caused by transferring them in the middle of their creation.

    2. When you trash files on an external volume or different partition from where your ~ directory resides, it doesn't actually move anything into the metaphorical trashcan on your desktop. I'm fairly confident that what it actually does is create a directory called .Trashes on that external volume and moves the trashed files to that folder. When you mount a volume with OS X, it displays the items in that .Trashes file as if they were sitting in the metaphorical trashcan on your dock, and when you unmount a volume in OS X, it removes them. The effect is that it looks like your files have moved, but they actually still reside on the remote volume. This is necessary because there is no guarantee that you will have space in your local disk to contain the data that is to be trashed on a remote volume or partition.

    This means that you probably aren't going to be able to hit those files by targetting anything in the trashcan (~/.Trash/). Instead, what looks like is happening is that the files you are trying to delete are corrupted, and Trashcan is choking on them; it can't delete them. So you are going to have to nuke the files directly off of the remote drive to get it to stop displaying in your trashcan. I suggest rm -rfv /remotedrive/.Trashes/ (don't miss!). You want to delete 7.4 million files. This will take hours. Thus, I suggest the -v option so you actually know that the files are being deleted before you invest hours in waiting to see the results.
     
  18. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #18




    im trying to delete one backup point that never finished. however, i seem to have 3 copies of that backup point in my trashes on my drive and on my mac.


    When i first dragged it to the trash it was a file called Backups.backupdb. I have that in my trash along with the other files with the name Backups.backupdb. and then a date.

    I have been trying terminal commands on the .trashes file on my external drive, along with the trash on my mac

    when i try to rm -rf the backups.backupdb without the date i get this

    rm: /Volumes/TimeMachineDrive/.Trashes/501/Backups.backupdb/ClayMacbook/2008-03-11-215622.inProgress/3F469799-2098-4F5A-A586-83600F477060/Macintosh HD/Users/claysandefur/Documents: Permission denied

    everything it tries to delete it says permission denied. Note that this is not the only thing that came back when i typed the command in, i just copied
    one of them.

    i get the same thing with -rfv.

    When i try to rm -rfv on the 501 file in .trashes (where all of those files are located. I get the same stuff, Permission denied on each file terminal tries to delete.



    ls -a ~/.Trash/ results in 3 dots? see attachment

    ls -a /.Trash/ results in no such file or directory? WHERE'D my trash go?


    ls -a /Volumes/TimeMachineVolume/ # substitute the real name of your time machine volume results in
    . .fseventsd
    .. Adobe extra apps
    .001b631eb82e All Movies
    .DS_Store Backups.backupdb
    .Spotlight-V100 Backups.backupdb 17-34-08
    .TemporaryItems Backups.backupdb 17-34-08 19-13-12
    .Trashes Backups.backupdb 19-13-01
    .com.apple.timemachine.supported Clay backup stuff for macbook


    ls -a /Volumes/TimeMachineVolume/.Trashes # ditto substitution - results in
    .
    ..
    501 (what are the dots, and inside the 501 file are the files im trying to delete.)


    inside the 501 folder are these


    .
    Backups.backupdb 17-34-08
    ..
    Backups.backupdb 17-34-08 19-13-12
    Backups.backupdb
    Backups.backupdb 19-13-01




    the last attachment is the permission denied stuff.


    so, hope i answered you questions. =]
     

    Attached Files:

  19. Blubbert macrumors 6502

    Joined:
    Nov 1, 2006
    #19
    prefix rm -rf with sudo. It will remove the permission denied errors you keep getting, and will delete the items forever.

    Also, the dots symbolize the folder itself and the folder one level up from the current folder. The single . symbolizes the very folder youre in, two dots (..) symbolize the folder the current folder is in.
     
  20. MonksMac macrumors 6502a

    MonksMac

    Joined:
    Dec 5, 2005
    Location:
    DFW
    #20
    Just hold down the option key (opt.) when you select empty trash. It just worked for me. Maybe it will work for you?:apple:
     
  21. yudilks macrumors regular

    Joined:
    Jan 30, 2006
    #21
    The weird files are from the Recycle Bin of your Windows partition... Boot and login into your Windows via Bootcamp, run the command prompt, and perform chkdsk command..

    If you cannot execute it while in Windows, you can set Windows to perform chkdsk next time it restarts, the restart and boot your Mac to Windows again so that chkdsk can be performed

    Empty the Recycle Bin afterwards.. This should solve the problem..
     
  22. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #22
    so i just type in "chkdsk" and thats all, nothing else? And if i can't how do i set it to do it next time it restarts?

    Why are these files going into my mac trash can?


    After i preform this should i be able to secure empty trash and get rid of the time machine backups? Isnt it still going to be like 8 millions files or whtvr




    EDIT: I DID IT. THE FILES ARE GONE, HOPEFULLY FOREVER. IM OFF TO TRY TO DELETE THE BACKUPS USING EITHER TERMINAL WITH THE SUDO COMMAND, LAST TIME IT WAS DELETING THEM IN TERMINAL FOR ABOUT 2 HOURS AND WHEN I CAME BACK TERMINAL WASNT RESPONDING. SO I HAD TO QUIT IT, HOPEFULLY IT WAS BECAUSE OF THOSE WINDOWS FILES. OR I MIGHT TRY A SECURE EMPTY TRASH.

    IF I DO IT WITH TERMINAL SHOULD I TRY TO EMPTY THE .TRASHES FOLDER ON MY EXTERNAL OR MY TRASH ON MY MAC?
     
  23. mason.kramer macrumors 6502

    mason.kramer

    Joined:
    Apr 16, 2007
    Location:
    Watertown, MA
    #23
    Yes you did answer my questions. We found the real location of the bad files, they were hiding, as expected, in /Volumes/TimeMachineDrive/.Trashes/

    Try sudo rm -rfv /Volumes/TimeMachineDrive/.Trashes/

    It will prompt you for your administrator's password, then run the command as root. I've never met a file that a sudo'd rm couldn't remove. Good luck! :)
     
  24. tennismanclay thread starter macrumors regular

    tennismanclay

    Joined:
    May 11, 2007
    Location:
    US-Texas
    #24
    Thanks guys

    The nightmare is over. Last night i sudo rm the 501 folder in my hidden .Trashes folder on my drive. They are gone from my drive, and from my trash. And now i feel right about how much space stuff is taking up on my external drive.

    Im kinda ocd about my trash, and my life is so much happier knowing that its empty =] I feel so relieved. :D



    Thanks for everything guys.
     
  25. hsotnicam8002 macrumors 6502

    hsotnicam8002

    Joined:
    Mar 13, 2008
    Location:
    United Kingdom
    #25
    Trashed the trash

    I had a Mac Dock trash item present only when in Parallels/Windows XP that would not empty. In Windows I went to Computer/Local Disc (E_colon)/.Trashes/501/PROBLEM_FILE and deleted the PROBLEM_FILE. It went to the Windows trash, which I then emptied. The Dock Trash emptied - great! :D
     

Share This Page