Problems emptying trash

Discussion in 'Mac OS X Lion (10.7)' started by sephseph, Sep 24, 2011.

  1. sephseph, Sep 24, 2011
    Last edited: Sep 24, 2011

    sephseph macrumors newbie

    sephseph

    Joined:
    Aug 12, 2009
    #1
    I'm having a bit of trouble with my macbook at the moment. I upgraded to Lion about a month ago, and since then, the empty trash function has been playing up.
    It's not working, at all.
    No error message, the empty trash sound plays, but it doesn't actually empty.
    This seems to be a problem with a number of other people, pointed out by a quick google search. But there doesn't seem to be a permanent solution at the moment.

    I have a workaround which I'm using - typing sudo rm -rf into the terminal window, dragging the contents of the trash into the terminal window, then entering my password which empties the trash.

    If there's no solution to emptying the trash, would some clever person be able to write me an automator script which opens a terminal window, enters the sudo rm -rf command, then enters the contents of my trash?

    Thanks in advance
     
  2. sephseph, Sep 24, 2011
    Last edited: Sep 24, 2011

    sephseph thread starter macrumors newbie

    sephseph

    Joined:
    Aug 12, 2009
    #3
    This has not worked.
    I tried all the options listed.

    The mac doesn't give an error, it plays the empty trash sound, but nothing happens.

    The terminal command seems to work though
     
  3. derbothaus macrumors 601

    derbothaus

    Joined:
    Jul 17, 2010
    #4
    So is anything IN the trash or just a jacked up graphic showing the trash to be full?
    Can you do a ls -al on your ~/.Trash directory?
     
  4. alexreich, Sep 26, 2011
    Last edited: Sep 26, 2011

    alexreich macrumors 6502a

    alexreich

    Joined:
    Jan 26, 2011
    #5
    There's the script I use when Finder won't let me empty the Trash.

    I actually have a keyboard shortcut set to run that script. If I press Shift+Down-Arrow it runs the script. That way I don't have to find the script in the Finder, then open it, which is ridiculous when all you want to do is empty your Trash.

    Hope you figure out the Trash issue so you can empty without Terminal, but the script will work.
     

    Attached Files:

  5. coteyr macrumors newbie

    Joined:
    Sep 27, 2011
    #6
    I have dealt with this before too.

    For me it always happens when I have several tiny files. Like deleting a couple of git repos. I always am able to clear it by running rm -rf ~/.Trash/* and letting that run for several hours. Sometimes it will show permission issues or the like, those can be overcome by using sudo (be careful). I have never had the trash not clear up, but it has, on occasion taking a REALLY long time(3 days is my record so far).

    Finder doesn't seem to like to remove thousands/millions of tiny files from the trash. It seems to be file system related though.

    Always run "Verify permissions" and "Verify Disk" before and after though. Specially if you had to use sudo.
     
  6. mariusbutuc macrumors newbie

    Joined:
    Mar 15, 2012
    #7
    Maybe it's the Time Machine

    There are many ways to go around this:
    1. Resetting the PRAM does the trick
    2. In the Terminal, just force the deletion of all files from the Trash: rm -rfv ~/.Trash/*
    3. etc.

    But sometimes the solution is way simpler: there's a file that was opened by an application e.g. Time Machine.

    Here's what worked for me:
    1. Restarted, unchecking Reopen windows when logging back in. Didn't work => it's not the actively running apps.
    2. After temporarily turning off Time Machine, emptying the Trash completed successfully!
     

Share This Page