Trash

Discussion in 'iMac' started by gangof4, Jul 26, 2011.

  1. gangof4 macrumors member

    gangof4

    Joined:
    Jun 6, 2011
    Location:
    Texas
    #1
    OK, I have over 5,000 files in my trash, some of which are locked and none of them delete. I tried the <option> delete approach and I also went into Utilities and entered the command prompt syntax that sometimes works. I'm hesitant (no, nervous) about popping in the SL disc to do it that way. Is there an application I can try that might work before I call Apple?
     
  2. Dresevski macrumors 6502

    Joined:
    May 6, 2011
    Location:
    Minnesnowda
    #2
    Have you searched for the way to do it through the terminal? That will allow you to be the most direct.
     
  3. tag macrumors 6502a

    tag

    Joined:
    Apr 29, 2005
    Location:
    PA, US
    #3
    While this isn't an application, going through terminal like Dresevski said is a good idea as long as you are comfortable doing so.

    Now there are numerous ways to delete items in the Trash through terminal. Though since you have nearly 5000 undeletable items, this may be a permissions problem with your Trash folder. So best bet would probably be to delete the whole Trash folder and have the OS recreate a new one which should have correct permissions from the get go.

    Now assuming these files in the trash are from your harddrive and not an external one you have plugged in (as that trash folder would be located somewhere else...) open up terminal and type..

    Code:
    sudo rm -rf ~/.Trash
    Make sure you type it exactly, or even copy/paste it into terminal. If even a character is off as always there could be dire consequences. You will then be asked to input your password, and then since you have 5000 items, this deletion will take a few moments. Now assuming this was successful and you received no errors, you no longer have a Trash folder, so if you try to delete anything you will get a message saying it will permanently be deleted.

    To fix this, now restart your computer, a new Trash folder will be generated with correct permissions and everything should be working as it should be.
     
  4. gangof4 thread starter macrumors member

    gangof4

    Joined:
    Jun 6, 2011
    Location:
    Texas
    #4
    No go. I got an error: [my user name] is not in the sudoers file. This incident will be reported.
    [my]-iMac:~ [username]$

    I have an administrator account set up but I use an ordinary user account. The trash is in my user account's trash. The trash basket in the administrator's account is empty.
     
  5. tag macrumors 6502a

    tag

    Joined:
    Apr 29, 2005
    Location:
    PA, US
    #5
    In that case you will have to log into your admin account, and then delete your users trash directory. Which would be at /Users/USERNAME/.Trash
     
  6. gangof4 thread starter macrumors member

    gangof4

    Joined:
    Jun 6, 2011
    Location:
    Texas
    #6
    Would that be through the terminal? What would the entire syntax be?
     
  7. tag macrumors 6502a

    tag

    Joined:
    Apr 29, 2005
    Location:
    PA, US
    #7
    Sorry...

    Yes this will be through terminal. Log into your administrators account and type

    Code:
    sudo rm -rf /Users/USERNAME/.Trash
    USERNAME being the username of the affected account with the files you want to delete.

    Note if you run into another sudo problem with the admin account, just try without the sudo and see what happens..

    Code:
    rm -rf /Users/USERNAME/.Trash
     
  8. gangof4 thread starter macrumors member

    gangof4

    Joined:
    Jun 6, 2011
    Location:
    Texas
    #8
    I got a different sort of error that time. I still have 981gb free on the hard drive. I think I'll just wait until the mac needs servicing some day lest I nuke my imac by mistake.
     
  9. tag macrumors 6502a

    tag

    Joined:
    Apr 29, 2005
    Location:
    PA, US
    #9
    Sorry to hear that didn't work. That's odd. Clearing the .Trash manually has always worked for me whenever something like what you described has happened.
     

Share This Page