Can't delete Windows XP folder from Trash

Discussion in 'macOS' started by sketchygio, Nov 1, 2009.

  1. sketchygio macrumors newbie

    Joined:
    Nov 1, 2009
    #1
    So, while cleaning up my macbook pro from old files, I mistakenly get into the NO NAME partition that appears in the OS X partition, but which holds some kind of Windows XP directories. I don't know how I managed to do so, but I somehow deleted a folder under NO NAME/Documents and Settings/[user name] and all the files in that directory.

    Not much harm was done, since it seems as though the folder was merely duplicated into the trash and still remains in its original directory in NO NAME. The problem is that every time I try to delete it from the trash it says I don't have permissions. It's only folders and they're all unlocked and I am logged on as admin. I've tried dragging the folder out of the trash but it merely duplicates it (although I have no issues deleting the duplicate). So I have folders that have no use being in or outside the trash, which are proving to be very difficult to delete. I tried verifying my disk fwith Disk Utility, but it resulted ok. Any suggestions?
     
  2. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #2
    This command in Terminal.app will force empty your user's trash:

    rm -fr ~/.Trash/*
     
  3. sketchygio thread starter macrumors newbie

    Joined:
    Nov 1, 2009
  4. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #4
    Was there a message, such as 'permission denied'?
     
  5. sketchygio thread starter macrumors newbie

    Joined:
    Nov 1, 2009
    #5
    Essentially. More precisely it says "The operation cannot be completed because you do not have sufficient privileges for some of the items". After that, I have to click Continue 9 times or so for the dialogue box to disappear. There are no actual files in the folders. I'm assuming it to be some error related to the folders being from Windows XP. More strange to me, is the fact that the folder gets cloned when it's moved out of the trash.
     
  6. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #6
    You lack write permissions so cannot delete nor move the files, which explains why a copy is made when trying to move the files. Try:

    sudo rm -fr ~/.Trash/*

    'sudo' will override permissions assuming your user is a sudoer.
     
  7. sketchygio thread starter macrumors newbie

    Joined:
    Nov 1, 2009
    #7
    That was a good suggestion. I hadn't thought about that, but still no cigar. Any other ideas?
     
  8. xlii macrumors 68000

    xlii

    Joined:
    Sep 19, 2006
    Location:
    Millis, Massachusetts
    #8
    At times, when I've been unable to delete a file from the trash I reboot my machine and that seems to do the trick. But I usually get a file still in use message. Have you tried undeleting the folder from the trash?
     
  9. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #9
    Try this command:

    chmod -R u+rw ~/.Trash/* && rm -fr ~/.Trash/*
     
  10. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #10
    PS: I'm logging off soon. If xlii's & my suggestions above don't do the trick, probably somehow another user owns those files (check "ls -l ~/.Trash" to verify), which would be odd since the files are in your trash, but anyway, in this case either become that user or root, or boot into single user mode & then: rm -fr /Users/XYZ/.Trash/*

    where "XYZ" = username where files are stuck in trash.
     
  11. sketchygio thread starter macrumors newbie

    Joined:
    Nov 1, 2009
    #11
    Thanks for all the suggestions so far/

    Yup, several times. Like mentioned above, trying to remove the files from the trash causes them to be duplicated, leaving one copy outside the trash and the original inside it.

    No effect :confused:

    I logged as root through terminal and ran the command. Didn't see to do anything. Also, when I checked "ls -l ~/.Trash" it didn't list anything in terminal. But upon checking the trash, the faulty folders are definitely still there.
     
  12. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #12
    When logging in as root, you need to give the full path, e.g.: /Users/XXX/.Trash/*

    where "XXX" = the username of the user with the files you're trying to delete

    as you're logged in as root, "~" shows root's folder
     
  13. alphaod macrumors Core

    alphaod

    Joined:
    Feb 9, 2008
    Location:
    NYC
    #13
    You don't even to logged in as root for that; just use sudo and it's the same.
     
  14. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #14
    The OP already indicated that "sudo rm -fr ~/.Trash/*" did not work. What would you recommend in this case? I agree that logging in with whichever account created the "mess" & running this command should work.
     
  15. sketchygio thread starter macrumors newbie

    Joined:
    Nov 1, 2009
    #15
    All right. Still going at it. Thanks for the continued help.

    I ran "/Users/XXX/.Trash/*" as root (where XXX is the username, and there really is only one, so I can't go wrong), but I got back
    "sh: /Users/XXX/.Trash/*: No such file or directory" I'm not sure I understand the purpose of the command but doesn't seem to have an effect.


    I only have one account on my mac partition, which is also the admin "XXX". However, it seems like the folder in the trash belongs to my windows XP partition username "YYY". Could that be the reason why I am not being allowed to delete it?
     
  16. macrem macrumors 65816

    macrem

    Joined:
    Mar 11, 2008
    #16
    "/Users/XXX/.Trash/*" is the path to all files in XXX user's trash without any command. The entire command is:
    rm -fr /Users/XXX/.Trash/*

    In case you're running this command as an admin user (not root), then use sudo:
    sudo rm -fr /Users/XXX/.Trash/*
     
  17. pontiacy macrumors newbie

    Joined:
    Aug 20, 2009
    #17
    I found that sometimes when you delete a file from an NTFS disk, you may have this problem. If you have paragon NTFS installed, under mac os you can try "utility - disk utility - repair disk" to repair the xp disk. Otherwise, you can boot into the xp system, and go to "start - run - "cmd" " and use check disk command: chkdsk. to repair the xp disk.
     
  18. sketchygio thread starter macrumors newbie

    Joined:
    Nov 1, 2009
    #18
    Long delay, but I'm still afflicted

    Really sorry for this super-delayed response. Got side tracked.

    Anywas, I did try your proposed solutions.

    Tried both, to no avail.

    Don't have paragon. Tried the chkdsk, but Windows found no errors in the disk. I could try to get a hold of paragon, but if Windows failed to repair its own disk, would this really work?

    Also, I don't believe the error exists withing the Windows partition. Sure, it originated from files which belonged originally to that partition, but the problem occurs in the Mac partition.

    Still open to suggestions.
     
  19. HeyOMGJae macrumors newbie

    Joined:
    Apr 29, 2010
    #19
    I'm having the same problem

    Although I don't know exactly what the OP is saying as to how the file originated, this is how my file originated:

    I was copying files from a friends XP PC to restore her computer after a virus. I copied her files onto my external hard drive. I did her restore, restored her files and deleted them from my hard drive.

    When ever I plug my external into my macbook, one lone folder from her computer is n the trash and gives me the same error... I dont have the privledges/permissions to delete. I've tried the option + empty feature. Not working. Folder is EMPTY. If I move it out of trash, it just duplicates itself. The duplicate will delete when I empty trash, but the original will not.

    I don't know what to do. Also, I am still somewhat new to mac, it's been almost a year since I started using mac as my primary computer, so I am comfortable with terminal but not completely, so if you have suggestions, a little more detailed walk through would be appreciated...


    to the OP, did you ever resolve this issue? If so, what did you do?
     
  20. HeyOMGJae macrumors newbie

    Joined:
    Apr 29, 2010
    #20
    My Fix

    I finally just decided to try plugging my hard drive into my PC. I had it set to show all hidden folders and deleted the folders that said something like .trashes or whatever.

    After I plugged my hard drive back into this mac, the undesirable folder was gone, finally. I should have tried this a long time ago! lol.

    Even tho the folder came from her PC, i was able to delete it on mine...
     
  21. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #21
    The trick here may be that the file is not in the user trash, but somewhere else (another volume, one of the rarely used special trash folders, etc). Try dragging one of the files into a Terminal window and see what path it specifies.

    jW
     

Share This Page