Cannot delete folder from trash

Discussion in 'Mac Basics and Help' started by parkerlewis, Mar 9, 2009.

  1. parkerlewis macrumors newbie

    Jan 23, 2009
    Hi everyone,

    I have tried everything and I cannot delete this folder from my trash. It's an empty folder because everything inside it is already deleted. I get this message when I try to empty trash.

    "The operation cannot be completed because the item "xxx" is in use."

    - I have tried going into Terminal and typing "sudo rm -rf" etc etc. Get the message "directory not empty".

    - Tried secure empty trash.

    - Tried using Cocktail.

    - Tried using Permanent Eraser.

    - Tried holding down "option" and emptying.

    - Tried logging out, logging in then emptying. Tried restarting and emptying.

    Nothing seems to work. I've looked through every thread on every forum I could find on google.

    I can move the folder back to my desktop. I can rename it. It's not locked or anything.

    Also, I tried emptying it in safe mode, but I can't seem to start up on safe mode!!! I turn off the computer, turn it on, hold down shift after I hear the startup noise, release shift when the grey apple logo comes up, and then it just shuts down on me. I can't boot up on safe mode!! It's so weird!

    I'm gonna try repairing disk permissions, but before I do, is there something I'm missing here? Anything else I can try?

    I'm on a PowerBook G4. Running Version 10.4.11. Everything is up to date.

    Thanks for any help!
  2. BlueRevolution macrumors 603


    Jul 26, 2004
    Montreal, QC
    Bizarre. If you can drag it to your desktop, have you tried doing rm -rf there?
  3. parkerlewis thread starter macrumors newbie

    Jan 23, 2009
    Yup. Dragged it to the desktop, did rm -rf. Still get the same message. I even put it into another folder on the desktop, did the same thing. Same message.
  4. MacGeekPro macrumors newbie

    Mar 8, 2009
    Mate, Sudo it! :p

    > sudo rm -rf filename (again only the first few letters, then 'tab' to autocomplete)

  5. plinden macrumors 68040


    Apr 8, 2004
    The OP says he used sudo.

    What does lsof tell you?
    lsof | grep <filename>
  6. parkerlewis thread starter macrumors newbie

    Jan 23, 2009
    Yeah, I tried sudo. Didn't work unfortunately.

    lsof doesn't tell me anything. I type the filename, press return, it waits for a while, then without saying anything it just goes down to a new command line. I tried it for other files, they seem to work fine!
  7. plinden macrumors 68040


    Apr 8, 2004
    Hmm, so nothing's using it.

    How about - this shows any flags set on the files or folders in the folder where you run it:
    ls -lO
    And do you have developer tools installed? There's another command called GetFileInfo that comes with the developer code.

    Edit: I experimented a bit with the developer tool SetFile, and I can still empty Trash even if the file/folder busy flag is set. So even if your folder's busy flag is set, it should still be removable if lsof shows nothing.
  8. Poncho macrumors 6502


    Jun 15, 2007
    A wild thought: if you have two Macs on the same LAN, can you see it on the other Mac and delete it from there?
  9. parkerlewis thread starter macrumors newbie

    Jan 23, 2009
    I don't know if I did this right, but this is what comes up when I do "ls -lo"

    total 8
    drwx------   10 User  User  -  340 Mar  9 21:21 Desktop
    drwx------   69 User  User  - 2346 Mar  8 16:46 Documents
    drwx------   42 User  User  - 1428 Jan 30 23:31 Library
    drwx------   12 User  User  -  408 Jan 27 19:22 Movies
    drwx------    6 User  User  -  204 Jan 31 11:37 Music
    drwx------    7 User  User  -  238 Jan 11 18:10 Pictures
    drwxr-xr-x    5 User  User  -  170 Aug  6  2008 Public
    lrwxr-xr-x    1 root   User  -   55 Dec 18  2007 Send Registration -> /Users/User/Library/Assistants/Send Registration.setup
    drwxr-xr-x    6 User  User  -  204 Aug  6  2008 Sites
    Don't have developer tools installed.

    Also don't have 2 Macs either.

    EDIT: So should I install developer tools and try that then?
  10. STXSTEVE macrumors member


    Mar 9, 2009
    i have had several experiences like this in the past. Finally found a app called "Trash It!" for mac. This will force trash everything i have thrown at it. Be careful it will trash anything! Simple Google search should find it for you.. Hope this helps.
  11. parkerlewis thread starter macrumors newbie

    Jan 23, 2009
    Tried Trash It! It doesn't work. I don't get an error message or anything. It says "All done!" but the folder is still in the trash! Same thing with Cocktail. No error message, everything runs smoothly, but the folder isn't deleted!
  12. plinden macrumors 68040


    Apr 8, 2004
    Are you in the folder containing the problem folder? Is the folder in that list? Is it the Send Registration link, since the others are all standard OS X folders?

    If that's the problem folder, try typing in Terminal "sudo unlink Send\ Registration" and it should be gone.

    Oh, and it's "ls -lO" ... upper case o.
  13. parkerlewis thread starter macrumors newbie

    Jan 23, 2009
    When I do "ls -lO" this is what comes up:

    ls: illegal option -- O
    usage: ls [-ABCFGHLPRSTWZabcdefghiklmnopqrstuwx1] [file ...]
    It only works when I do it in lowercase.

    And when I type a filename next to ls -lo, it says "No such file or directory"

    And the folder is in the trash and it's not on that list. It's not the Send Registration link. Is there something wrong with that too? I don't even know what that is.

    Anyway to give some more detail, the folder I am trying to get rid of was a folder in the iTunes Music directory. I got rid of all the .mp3s in it, but the folder remains. I tried restarting without the iTunes Helper running, it still didn't delete. Dunno if that will help with solving this.

    Gah, I'm just about ready to give up. I'll repair permissions before I go to bed and I'll report back in the morning.

    Thanks anyway!
  14. plinden macrumors 68040


    Apr 8, 2004
    Doh, sorry. You're running 10.4 - I didn't read closely enough. The upper case o is for Leopard.

    Anway, cd to .Trash in Terminal and type ls -lo
  15. parkerlewis thread starter macrumors newbie

    Jan 23, 2009
    Ah okay!

    total 0
    drwxrwxrwx   4 User  User  - 136 Jul 25  2008 music

Share This Page