Force empty trash

Discussion in 'macOS' started by digitalpencil, Mar 23, 2008.

  1. digitalpencil macrumors 6502

    digitalpencil

    Joined:
    Jul 2, 2007
    Location:
    Manchester, UK
    #1
    When I attempt to empty trash, finder fires the following error:
    "The operation cannot be completed because the item ".$$ Stuffit Temp 1145622540" is in use" 'stop' 'continue'
    This file is not visible in trash, the only items present are one folder with another empty folder inside.

    I've tried using rm -rf ~/.Trash/* to no avail. It fires no errors but still doesn't empty the trash. I've also tried an applescript called 'Force Empty Trash 1.0', which I imagine does the same thing but also does nothing to the trash and fires no errors.

    Any ideas how to forcefully empty my trash would be seriously appreciated. It's driving me insane! :confused:
     
  2. tyr2 macrumors 6502a

    tyr2

    Joined:
    May 6, 2006
    Location:
    Leeds, UK
    #2
    It's the '.' that proceeds the filename that's preventing it from being deleted by rm, and hiding it from view in Finder.

    This should work for your rm command.

    rm -rf ~/.Trash/.*

    However as the warning states something has that file open, so even if you delete it in the Trash directory you won't actually get the disk space back until either the app holding it open closes, or you reboot the machine. Also you may cause problems for whatever app has the file handle open.

    Personally I'd suggest checking for any 'stuffit' processes with Activity Monitor and killing them off, and trying the normal empty trash again. Alternatively reboot then just empty the trash and it should work fine.
     
  3. digitalpencil thread starter macrumors 6502

    digitalpencil

    Joined:
    Jul 2, 2007
    Location:
    Manchester, UK
    #3
    Thanks for the tip.

    Tried the '.*' and terminal fired: rm: "." and ".." may not be removed

    Also, this problem has been persisting for days. I have rebooted several times, StuffIt is not currently running and Activity Monitor lists no stuffit processes (as far as i know).
    Right now, I have FF, iTunes and uTorrent under Wine running but I get the same error when I attempt to empty after a cold boot with nothing running.
     
  4. tyr2 macrumors 6502a

    tyr2

    Joined:
    May 6, 2006
    Location:
    Leeds, UK
    #4
    The error you saw is fine. But the rest seems a bit strange. I assume the problem still persists?

    Do this and cut/paste the output here and it should help to see what's going on.
    Code:
    cd ~/.Trash
    ls -la
    
     
  5. digitalpencil thread starter macrumors 6502

    digitalpencil

    Joined:
    Jul 2, 2007
    Location:
    Manchester, UK
    #5
    Yeah, still persists..

    results of ls are:
    total 0
    drwx------ 2 davegrant davegrant 68 24 Mar 00:03 .
    drwxr-xr-x+ 33 davegrant davegrant 1122 20 Mar 20:33 ..
     
  6. tyr2 macrumors 6502a

    tyr2

    Joined:
    May 6, 2006
    Location:
    Leeds, UK
    #6
    Interesting. In that case the file is probably stored in . Trashes either on your boot disk or another attached disk.

    Try this.

    sudo find /Volumes/*/.Trashes

    and see what it finds. You'll need to type your password when prompted.
     

Share This Page