Cannot remove stubborn items from trash

Discussion in 'OS X Yosemite (10.10)' started by galstaph, Jan 5, 2015.

  1. galstaph macrumors 6502a

    galstaph

    Joined:
    Jul 24, 2002
    Location:
    The Great White North Eh
    #1
    Ok so i have some stuck items in the trash, tried forcing empty, tried trash it, onyx, even tried terminal - rebuilding trashes for the account and checking if it is an immutable bit. here is the terminal output for the immutable check:

    ls -lhd0 /Volumes/biggest/.Trashes/501/accurate\ recovered\ documents/documents/0001\ My\ Documents\ Miriams\ Comp/11achurch\ folder/Fw_\ Foothills\ Stake\ Family\ Home\ Evening\ Manual.eml\:OECustomProperty
    ls: illegal option -- 0
    usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

    When I tried the rm terminal command, I got a lot of errors stating that the directory was not empty and that there was no such file or directory....

    I even clean installed yosemite to see if that would help - no avail...

    Any suggestions? This is bugging the heck out of me!!
     
  2. fisherking macrumors 601

    fisherking

    Joined:
    Jul 16, 2010
    Location:
    ny somewhere
    #2
    i had a file (the remnants of a deleted app) that NOTHING would trash, but this actually did it...

    EDIT: sorry just realized you've mentioned 'trashit'. weird... try looking at the package contents? changing permissions?
     
  3. BasicGreatGuy Contributor

    BasicGreatGuy

    Joined:
    Sep 21, 2012
    Location:
    In the middle of several books.
    #3
    Did you try holding down the option key while you choose empty trash from Finder menu?

    ----------

    OP tried that already.
     
  4. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #4
    What is the exact Terminal command you used? Have you tried:

    Code:
    sudo rm -r ~/.Trash
     
  5. dyt1983 macrumors 65816

    Joined:
    May 6, 2014
    Location:
    USA USA USA
    #5
    Repair disk from Disk Utility. Then try to trash it again. If it's your startup disk you will need to boot in recovery mode.

    p.s. your 'ls' has a wrong flag, I think you mean "ls -lhdO"
     
  6. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #6
    Colons are illegal in Mac filenames.
    Try this: Remove All Illegal Characters from All Filenames in a Given Folder

    You may need to move the offending file out of the trash in order to get the above to work. The trash folder sets some limitations on what you can do to the files inside it.
     
  7. dyt1983 macrumors 65816

    Joined:
    May 6, 2014
    Location:
    USA USA USA
    #7
    He was in terminal. Colons are not illegal in filenames. Only the forward slash. Finder converts back and forth between colons and slashes. The trash folder limitations are also only in Finder. In terminal, anything goes.
     
  8. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #8
    Go into Finder.
    Choose a file.
    Try to add a : to its name.
    Read the error message.
    It's been this way since like, forever.
     
  9. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #9
    Read the rest of dyt1983'a post. A colon is only a limitation with Finder, not Terminal, the UNIX subsystem, or HFS+.
     
  10. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #10
    Yup, it's illegal there, and expecting Finder to deal with it happily is a stretch. That's why you get problems when when you try to deal with such names through the Finder. Colon used to be folder separator in the Mac file system, so it's not surprising that there are still glitches when you include it in a file name. Even when you're working in Terminal, sooner or later the Finder has to be told that you've done something to a file, else it'll just keep happily drawing an icon for it. If Finder chokes on the name, you've got a problem whether you're starting your action from Finder, Terminal, AppleScript or whatever.
     
  11. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #11
    Terminal and the UNIX subsystem do not have a problem with colons in file/folder names. As long as the script doesn't interact with Finder, it can use a colon in the path name without a problem. When a file/folder with a colon in it is viewed/manipulated from within Finder, the colon is replaced with a forward slash, but only within Finder. On the filesystem, in Terminal, and anything else that doesn't use Finder, the file/folder still has the colon in its name. I can easily create a folder in Terminal with a colon in its name, add stuff to it using Finder, move it to a different folder with Finder, then move it to the Trash and empty the Trash. Finder doesn't complain at all. It may have complained in much older versions, but as of 10.6, Finder is fully colon compliant.
     
  12. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #12
    Still won't let you type a colon in a file name. That strikes me as non-compliant. Better to avoid the things generally, and not court problems.
     
  13. Intell macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #13
    It's compliant in every other way. Much more so than Windows Explorer and its illegal characters. Summation, colons are not illegal in Mac file names, only within Finder.
     
  14. w0lf macrumors 65816

    w0lf

    Joined:
    Feb 16, 2013
    Location:
    USA
    #14
    Reboot. Your trash is most likely already empty and just bugged showing some item remaining. It's not even that uncommon of a bug.
     
  15. Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #15
    Good advice. Sometimes just restarting Finder will make an evil trashed file go away.
     
  16. dyt1983, Jan 6, 2015
    Last edited: Jun 1, 2015

    dyt1983 macrumors 65816

    Joined:
    May 6, 2014
    Location:
    USA USA USA
    #16
    edit: To remove personally identifying info not relevant to the conversation.
     
  17. GatorGhost macrumors regular

    GatorGhost

    Joined:
    Jun 30, 2014
    #17

    Try this program....it worked for me

    Trash It! Trash It! 6.0.1 12-Oct-2014 Force-empty your trash can. 123458
    Free Download Trash It! from MacUpdate.com Download
    3.6 MB(Intel) http://www.macupdate.com/download/8214/trashit.zip Email me when discounted: More Apps | NoName Scriptware
    Trash It! is an AppleScript-based application that force-empties your Trash and/or removes stubborn items. Especially useful if you have files or folders in the Trash with permissions set incorrectly, locked Trash items, want to securely delete a stuck item, or trash items from other partitions. If you drop files or folders onto the Trash It! icon, it will delete them as well. If you double-click on it, it will clean out your Trash can. This is the software recommended by Apple Tech support when all else fails!

    Trash It! should be used when:

    You can't get rid of trash items manually.
    You can't move more...
    What's New
    Version 6.0.1:
    Fixed a bug introduced in 6.0
    New algorithms for faster usage.
    Should get rid of Time Machine files accidentally dragged to the trash. Please read the readme file for more info.
    Code optimization changes.
    Requirements



    Download Trash It! 4.1 (OS X 10.5 or earlier, Intel/PPC)
     
  18. BasicGreatGuy Contributor

    BasicGreatGuy

    Joined:
    Sep 21, 2012
    Location:
    In the middle of several books.
    #18
    The OP stated that Trash It! had not worked.
     

Share This Page